MediaWiki  master
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         function providerPlural() {
00018                 return array (
00019                         array( 'Form 4', 0 ),
00020                         array( 'Form 2', 1 ),
00021                         array( 'Form 3', 2 ),
00022                         array( 'Form 4', 3 ),
00023                         array( 'Form 1', 20 ),
00024                         array( 'Form 2', 21 ),
00025                         array( 'Form 3', 22 ),
00026                         array( 'Form 4', 23 ),
00027                         array( 'Form 4', 50 ),
00028                 );
00029         }
00030 
00031 }