mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 15:30:42 +00:00
Merge "AbuseFilterExtensionJsonTest: Allow skipping other extension hooks"
This commit is contained in:
commit
b0771ea6ca
|
@ -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