mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 13:46:48 +00:00
AbuseFilterExtensionJsonTest: Allow skipping other extension hooks
Change-Id: I1146cec2b27c964f5ed07e7da76fc7b9ec4a09c5
This commit is contained in:
parent
841214ab43
commit
1c0ab3010a
|
@ -16,11 +16,12 @@ class AbuseFilterExtensionJsonTest extends ExtensionJsonTestBase {
|
|||
protected string $extensionJsonPath = __DIR__ . '/../../../extension.json';
|
||||
|
||||
public function provideHookHandlerNames(): iterable {
|
||||
foreach ( $this->getExtensionJson()['HookHandlers'] ?? [] as $hookHandlerName => $specification ) {
|
||||
if ( $hookHandlerName === 'UserMerge' && !ExtensionRegistry::getInstance()->isLoaded( 'UserMerge' ) ) {
|
||||
$extHookHandlers = [ 'CheckUser', 'ConfirmEdit', 'Echo', 'UserMerge' ];
|
||||
foreach ( $this->getExtensionJson()['HookHandlers'] ?? [] as $name => $specification ) {
|
||||
if ( in_array( $name, $extHookHandlers ) && !ExtensionRegistry::getInstance()->isLoaded( $name ) ) {
|
||||
continue;
|
||||
}
|
||||
yield [ $hookHandlerName ];
|
||||
yield [ $name ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue