3 class LocalisationCacheTest
extends MediaWikiTestCase
{
4 public function testPuralRulesFallback() {
5 $cache = Language
::getLocalisationCache();
8 $cache->getItem( 'ar', 'pluralRules' ),
9 $cache->getItem( 'arz', 'pluralRules' ),
10 'arz plural rules (undefined) fallback to ar (defined)'
14 $cache->getItem( 'ar', 'compiledPluralRules' ),
15 $cache->getItem( 'arz', 'compiledPluralRules' ),
16 'arz compiled plural rules (undefined) fallback to ar (defined)'
19 $this->assertNotEquals(
20 $cache->getItem( 'ksh', 'pluralRules' ),
21 $cache->getItem( 'de', 'pluralRules' ),
22 'ksh plural rules (defined) dont fallback to de (defined)'
25 $this->assertNotEquals(
26 $cache->getItem( 'ksh', 'compiledPluralRules' ),
27 $cache->getItem( 'de', 'compiledPluralRules' ),
28 'ksh compiled plural rules (defined) dont fallback to de (defined)'