4 * @covers LocalisationCache
6 class LocalisationCacheTest
extends MediaWikiTestCase
{
7 public function testPuralRulesFallback() {
8 $cache = Language
::getLocalisationCache();
11 $cache->getItem( 'ar', 'pluralRules' ),
12 $cache->getItem( 'arz', 'pluralRules' ),
13 'arz plural rules (undefined) fallback to ar (defined)'
17 $cache->getItem( 'ar', 'compiledPluralRules' ),
18 $cache->getItem( 'arz', 'compiledPluralRules' ),
19 'arz compiled plural rules (undefined) fallback to ar (defined)'
22 $this->assertNotEquals(
23 $cache->getItem( 'ksh', 'pluralRules' ),
24 $cache->getItem( 'de', 'pluralRules' ),
25 'ksh plural rules (defined) dont fallback to de (defined)'
28 $this->assertNotEquals(
29 $cache->getItem( 'ksh', 'compiledPluralRules' ),
30 $cache->getItem( 'de', 'compiledPluralRules' ),
31 'ksh compiled plural rules (defined) dont fallback to de (defined)'