tests: Use LanguageFactory to create en language

Bug: T343771
Change-Id: Id2423c87c17a2f357d5e1cfeef3aeb83b6ad9a0d
This commit is contained in:
Umherirrender 2024-07-20 21:41:52 +02:00
parent 750410c687
commit 6db3b3287f

View file

@ -23,7 +23,6 @@
namespace MediaWiki\Extension\AbuseFilter\Tests\Integration\Parser;
use EmptyBagOStuff;
use LanguageEn;
use MediaWiki\Extension\AbuseFilter\AbuseFilterServices;
use MediaWiki\Extension\AbuseFilter\Parser\FilterEvaluator;
use MediaWiki\Extension\AbuseFilter\Variables\LazyVariableComputer;
@ -54,7 +53,7 @@ class ParserEquivsetTest extends MediaWikiIntegrationTestCase {
private function getParser(): FilterEvaluator {
// We're not interested in caching or logging; tests should call respectively setCache
// and setLogger if they want to test any of those.
$contLang = new LanguageEn();
$contLang = $this->getServiceContainer()->getLanguageFactory()->getLanguage( 'en' );
$cache = new EmptyBagOStuff();
$logger = new \Psr\Log\NullLogger();
$keywordsManager = AbuseFilterServices::getKeywordsManager();