X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fcache%2FMessageCacheTest.php;h=9c59e659f905b2e3c85f5b0b38d2db8f43b93760;hb=77c73301727a29bb8f34559de60a6f5b81c27bd8;hp=3559f15879978d4306d3cc87fd7803877dfaca44;hpb=fedbf95f4718e657a8c24dd1db689df1afa62431;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/cache/MessageCacheTest.php b/tests/phpunit/includes/cache/MessageCacheTest.php index 3559f15879..9c59e659f9 100644 --- a/tests/phpunit/includes/cache/MessageCacheTest.php +++ b/tests/phpunit/includes/cache/MessageCacheTest.php @@ -52,24 +52,23 @@ class MessageCacheTest extends MediaWikiLangTestCase { $this->makePage( 'MessageCacheTest-FullKeyTest', 'ru' ); // In content language -- get base if no derivative - $this->makePage( 'FallbackLanguageTest-NoDervContLang', 'de', 'de/none', false ); + $this->makePage( 'FallbackLanguageTest-NoDervContLang', 'de', 'de/none' ); } /** * Helper function for addDBData -- adds a simple page to the database * * @param string $title Title of page to be created - * @param string $lang Language and content of the created page + * @param string $lang Language and content of the created page * @param string|null $content Content of the created page, or null for a generic string - * @param bool $createSubPage Set to false if a root page should be created */ - protected function makePage( $title, $lang, $content = null, $createSubPage = true ) { + protected function makePage( $title, $lang, $content = null ) { global $wgContLang; if ( $content === null ) { $content = $lang; } - if ( $lang !== $wgContLang->getCode() || $createSubPage ) { + if ( $lang !== $wgContLang->getCode() ) { $title = "$title/$lang"; } @@ -84,7 +83,7 @@ class MessageCacheTest extends MediaWikiLangTestCase { * * @dataProvider provideMessagesForFallback */ - function testMessageFallbacks( $message, $lang, $expectedContent ) { + public function testMessageFallbacks( $message, $lang, $expectedContent ) { $result = MessageCache::singleton()->get( $message, true, $lang ); $this->assertEquals( $expectedContent, $result, "Message fallback failed." ); } @@ -112,7 +111,7 @@ class MessageCacheTest extends MediaWikiLangTestCase { * * @dataProvider provideMessagesForFullKeys */ - function testFullKeyBehaviour( $message, $lang, $expectedContent ) { + public function testFullKeyBehaviour( $message, $lang, $expectedContent ) { $result = MessageCache::singleton()->get( $message, true, $lang, true ); $this->assertEquals( $expectedContent, $result, "Full key message fallback failed." ); }