wiki.techinc.nl/tests/phpunit/includes/language/LanguageFallbackIntegrationTest.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
838 B
PHP
Raw Normal View History

<?php
use MediaWiki\Languages\LanguageFallback;
use MediaWiki\MainConfigNames;
/**
* @group Language
* @covers \MediaWiki\Languages\LanguageFallback
*/
class LanguageFallbackIntegrationTest extends MediaWikiIntegrationTestCase {
use LanguageFallbackTestTrait;
private function getCallee( array $options = [] ) {
if ( isset( $options['siteLangCode'] ) ) {
$this->overrideConfigValue( MainConfigNames::LanguageCode, $options['siteLangCode'] );
}
if ( isset( $options['fallbackMap'] ) ) {
$this->setService( 'LocalisationCache', $this->getMockLocalisationCache(
1, $options['fallbackMap'] ) );
}
return $this->getServiceContainer()->getLanguageFallback();
}
private function getMessagesKey() {
return LanguageFallback::MESSAGES;
}
private function getStrictKey() {
return LanguageFallback::STRICT;
}
}