X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fcache%2FLocalisationCacheTest.php;h=5eed01cb2dafd80528772b2922a94fb4cdf32d79;hb=cf35ff756c89ca6d6e003b440076df5ebe7ccef7;hp=697eb2dc817b215f1fa1e1d64514550000bc3c48;hpb=92a52ddc527d5aeb2e7e2e931c23b4a15061378a;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/cache/LocalisationCacheTest.php b/tests/phpunit/includes/cache/LocalisationCacheTest.php index 697eb2dc81..5eed01cb2d 100644 --- a/tests/phpunit/includes/cache/LocalisationCacheTest.php +++ b/tests/phpunit/includes/cache/LocalisationCacheTest.php @@ -61,21 +61,21 @@ class LocalisationCacheTest extends MediaWikiTestCase { public function testRecacheFallbacks() { $lc = $this->getMockLocalisationCache(); - $lc->recache( 'uk' ); + $lc->recache( 'ba' ); $this->assertEquals( [ - 'present-uk' => 'uk', + 'present-ba' => 'ba', 'present-ru' => 'ru', 'present-en' => 'en', ], - $lc->getItem( 'uk', 'messages' ), + $lc->getItem( 'ba', 'messages' ), 'Fallbacks are only used to fill missing data' ); } public function testRecacheFallbacksWithHooks() { // Use hook to provide updates for messages. This is what the - // LocalisationUpdate extension does. See bug 68781. + // LocalisationUpdate extension does. See T70781. $this->mergeMwGlobalArrayValue( 'wgHooks', [ 'LocalisationCacheRecacheFallback' => [ function ( @@ -84,7 +84,7 @@ class LocalisationCacheTest extends MediaWikiTestCase { array &$cache ) { if ( $code === 'ru' ) { - $cache['messages']['present-uk'] = 'ru-override'; + $cache['messages']['present-ba'] = 'ru-override'; $cache['messages']['present-ru'] = 'ru-override'; $cache['messages']['present-en'] = 'ru-override'; } @@ -93,14 +93,14 @@ class LocalisationCacheTest extends MediaWikiTestCase { ] ); $lc = $this->getMockLocalisationCache(); - $lc->recache( 'uk' ); + $lc->recache( 'ba' ); $this->assertEquals( [ - 'present-uk' => 'uk', + 'present-ba' => 'ba', 'present-ru' => 'ru-override', 'present-en' => 'ru-override', ], - $lc->getItem( 'uk', 'messages' ), + $lc->getItem( 'ba', 'messages' ), 'Updates provided by hooks follow the normal fallback order.' ); }