MediaWiki  REL1_22
LanguageGdTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageGdTest extends LanguageClassesTestCase {
00014     public function testPlural( $result, $value ) {
00015         $forms = array( 'one', 'two', 'few', 'other' );
00016         $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00017     }
00018 
00019     public static function providerPlural() {
00020         return array(
00021             array( 'other', 0 ),
00022             array( 'one', 1 ),
00023             array( 'two', 2 ),
00024             array( 'one', 11 ),
00025             array( 'two', 12 ),
00026             array( 'few', 3 ),
00027             array( 'few', 19 ),
00028             array( 'other', 200 ),
00029         );
00030     }
00031 
00036     public function testExplicitPlural( $result, $value ) {
00037         $forms = array( 'one', 'two', 'few', 'other', '11=Form11', '12=Form12' );
00038         $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00039     }
00040 
00041     public static function providerPluralExplicit() {
00042         return array(
00043             array( 'other', 0 ),
00044             array( 'one', 1 ),
00045             array( 'two', 2 ),
00046             array( 'Form11', 11 ),
00047             array( 'Form12', 12 ),
00048             array( 'few', 3 ),
00049             array( 'few', 19 ),
00050             array( 'other', 200 ),
00051         );
00052     }
00053 }