1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php
class LocalisationCacheTest extends MediaWikiTestCase {
public function testPuralRulesFallback() {
$cache = Language::getLocalisationCache();
$this->assertEquals(
$cache->getItem( 'ar', 'pluralRules' ),
$cache->getItem( 'arz', 'pluralRules' ),
'arz plural rules (undefined) fallback to ar (defined)'
);
$this->assertEquals(
$cache->getItem( 'ar', 'compiledPluralRules' ),
$cache->getItem( 'arz', 'compiledPluralRules' ),
'arz compiled plural rules (undefined) fallback to ar (defined)'
);
$this->assertNotEquals(
$cache->getItem( 'ksh', 'pluralRules' ),
$cache->getItem( 'de', 'pluralRules' ),
'ksh plural rules (defined) dont fallback to de (defined)'
);
$this->assertNotEquals(
$cache->getItem( 'ksh', 'compiledPluralRules' ),
$cache->getItem( 'de', 'compiledPluralRules' ),
'ksh compiled plural rules (defined) dont fallback to de (defined)'
);
}
}
|