diff --git a/tests/phpunit/DiscussionParserTest.php b/tests/phpunit/DiscussionParserTest.php index 51ae799c8..8d0f83a98 100644 --- a/tests/phpunit/DiscussionParserTest.php +++ b/tests/phpunit/DiscussionParserTest.php @@ -1,7 +1,5 @@ true ] ); - - // Since we reset the $wgContLang global, reset the TitleParser service - $services = MediaWikiServices::getInstance(); - if ( is_callable( [ $services, 'getTitleParser' ] ) ) { - // TODO: All of this should use $this->setService() - $services->resetServiceForTesting( 'TitleParser' ); - $services->redefineService( 'TitleParser', function () use ( $langObj ) { - global $wgLocalInterwikis; - return new MediaWikiTitleCodec( - $langObj, - new GenderCache(), - $wgLocalInterwikis - ); - } ); - // Cleanup - $lock = new ScopedCallback( function () use ( $services ) { - $services->resetServiceForTesting( 'TitleParser' ); - } ); - } + $this->overrideMwServices(); // pages to be created: templates may be used to ping users (e.g. // {{u|...}}) but if we don't have that template, it just won't work!