MediaWiki  REL1_21
LanguageGvTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageGvTest extends LanguageClassesTestCase {
00010 
00012         function testPlural( $result, $value ) {
00013                 // This is not compatible with CLDR plural rules http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#gv
00014                 $forms = array( 'Form 1', 'Form 2', 'Form 3', 'Form 4' );
00015                 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00016         }
00017 
00018         function providerPlural() {
00019                 return array(
00020                         array( 'Form 4', 0 ),
00021                         array( 'Form 2', 1 ),
00022                         array( 'Form 3', 2 ),
00023                         array( 'Form 4', 3 ),
00024                         array( 'Form 1', 20 ),
00025                         array( 'Form 2', 21 ),
00026                         array( 'Form 3', 22 ),
00027                         array( 'Form 4', 23 ),
00028                         array( 'Form 4', 50 ),
00029                 );
00030         }
00031 
00032 }