Use MediaWikiServices::getMessageCache

This required MediaWiki 1.34

Change-Id: I86291dfaf83cdeeb96693979272bf7d4589d650f
This commit is contained in:
Umherirrender 2020-03-14 14:08:25 +01:00
parent f28db2b7c8
commit 1cdb1d25c8
2 changed files with 5 additions and 3 deletions

View file

@ -10,7 +10,7 @@
"type": "antispam",
"license-name": "GPL-2.0-or-later",
"requires": {
"MediaWiki": ">= 1.31.0"
"MediaWiki": ">= 1.34.0"
},
"GroupPermissions": {
"user": {

View file

@ -1,5 +1,7 @@
<?php
use MediaWiki\MediaWikiServices;
/**
* @group SpamBlacklist
* @group Database
@ -75,7 +77,7 @@ class SpamBlacklistTest extends MediaWikiTestCase {
'files' => [],
] );
\MessageCache::singleton()->enable();
MediaWikiServices::getInstance()->getMessageCache()->enable();
$this->insertPage( 'MediaWiki:Spam-blacklist', implode( "\n", $this->blacklist ) );
$this->insertPage( 'MediaWiki:Spam-whitelist', implode( "\n", $this->whitelist ) );
@ -87,7 +89,7 @@ class SpamBlacklistTest extends MediaWikiTestCase {
}
protected function tearDown() : void {
\MessageCache::singleton()->disable();
MediaWikiServices::getInstance()->getMessageCache()->disable();
parent::tearDown();
}
}