<?php
+
+use MediaWiki\Config\ServiceOptions;
+use Psr\Log\NullLogger;
+
/**
* @group Database
* @group Cache
*/
protected function getMockLocalisationCache() {
global $IP;
- $lc = $this->getMockBuilder( 'LocalisationCache' )
- ->setConstructorArgs( [ [ 'store' => 'detect' ] ] )
+
+ $lc = $this->getMockBuilder( LocalisationCache::class )
+ ->setConstructorArgs( [
+ new ServiceOptions( LocalisationCache::CONSTRUCTOR_OPTIONS, [
+ 'forceRecache' => false,
+ 'manualRecache' => false,
+ 'ExtensionMessagesFiles' => [],
+ 'MessagesDirs' => [],
+ ] ),
+ new LCStoreDB( [] ),
+ new NullLogger
+ ] )
->setMethods( [ 'getMessagesDirs' ] )
->getMock();
$lc->expects( $this->any() )->method( 'getMessagesDirs' )
return $lc;
}
- public function testPuralRulesFallback() {
+ public function testPluralRulesFallback() {
$cache = $this->getMockLocalisationCache();
$this->assertEquals(