test: coverage recording now needs to be explicit
[mediawiki.git] / tests / phpunit / includes / LocalisationCacheTest.php
blobb34847aa1417793d4ba98c52dad7c1ada8e7ee41
1 <?php
3 class LocalisationCacheTest extends MediaWikiTestCase {
4 public function testPuralRulesFallback() {
5 $cache = Language::getLocalisationCache();
7 $this->assertEquals(
8 $cache->getItem( 'ar', 'pluralRules' ),
9 $cache->getItem( 'arz', 'pluralRules' ),
10 'arz plural rules (undefined) fallback to ar (defined)'
13 $this->assertEquals(
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)'