diff options
Diffstat (limited to 'MLEB/Translate/tests/phpunit/TranslateHooksTest.php')
-rw-r--r-- | MLEB/Translate/tests/phpunit/TranslateHooksTest.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/MLEB/Translate/tests/phpunit/TranslateHooksTest.php b/MLEB/Translate/tests/phpunit/TranslateHooksTest.php index c711c557..63bcb637 100644 --- a/MLEB/Translate/tests/phpunit/TranslateHooksTest.php +++ b/MLEB/Translate/tests/phpunit/TranslateHooksTest.php @@ -12,17 +12,15 @@ * @group medium */ class TranslateHooksTest extends MediaWikiLangTestCase { - protected function setUp() { + protected function setUp() : void { parent::setUp(); - global $wgHooks; $this->setMwGlobals( [ - 'wgHooks' => $wgHooks, 'wgTranslateDocumentationLanguageCode' => 'qqq', 'wgTranslateTranslationServices' => [], 'wgTranslateMessageNamespaces' => [ NS_MEDIAWIKI ], ] ); - $wgHooks['TranslatePostInitGroups'] = [ [ $this, 'getTestGroups' ] ]; + $this->setTemporaryHook( 'TranslatePostInitGroups', [ $this, 'getTestGroups' ] ); $mg = MessageGroups::singleton(); $mg->setCache( new WANObjectCache( [ 'cache' => wfGetCache( 'hash' ) ] ) ); |