| 1 |
<?php |
| 2 |
|
| 3 |
use MediaWiki\Languages\LanguageFallback; |
| 4 |
use MediaWiki\MainConfigNames; |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
class LanguageFallbackIntegrationTest extends MediaWikiIntegrationTestCase { |
| 11 |
use LanguageFallbackTestTrait; |
| 12 |
|
| 13 |
private function getCallee( array $options = [] ) { |
| 14 |
if ( isset( $options['siteLangCode'] ) ) { |
| 15 |
$this->overrideConfigValue( MainConfigNames::LanguageCode, $options['siteLangCode'] ); |
| 16 |
} |
| 17 |
if ( isset( $options['fallbackMap'] ) ) { |
| 18 |
$this->setService( 'LocalisationCache', $this->getMockLocalisationCache( |
| 19 |
1, $options['fallbackMap'] ) ); |
| 20 |
} |
| 21 |
return $this->getServiceContainer()->getLanguageFallback(); |
| 22 |
} |
| 23 |
|
| 24 |
private function getMessagesKey() { |
| 25 |
return LanguageFallback::MESSAGES; |
| 26 |
} |
| 27 |
|
| 28 |
private function getStrictKey() { |
| 29 |
return LanguageFallback::STRICT; |
| 30 |
} |
| 31 |
} |