Remove messages.inc, rebuildLanguage.php, writeMessagesArray.inc
[mediawiki.git] / tests / phpunit / includes / LocalisationCacheTest.php
blobf98410a1b8a8d6bbc705fb75909646af28092996
1 <?php
3 /**
4 * @covers LocalisationCache
5 */
6 class LocalisationCacheTest extends MediaWikiTestCase {
7 public function testPuralRulesFallback() {
8 $cache = Language::getLocalisationCache();
10 $this->assertEquals(
11 $cache->getItem( 'ar', 'pluralRules' ),
12 $cache->getItem( 'arz', 'pluralRules' ),
13 'arz plural rules (undefined) fallback to ar (defined)'
16 $this->assertEquals(
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)'