MediaWiki  REL1_22
LanguageBeTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageBeTest extends LanguageClassesTestCase {
00014     public function testPlural( $result, $value ) {
00015         $forms = array( 'one', 'few', 'many', 'other' );
00016         $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00017     }
00018 
00023     public function testGetPluralRuleType( $result, $value ) {
00024         $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
00025     }
00026 
00027     public static function providePlural() {
00028         return array(
00029             array( 'one', 1 ),
00030             array( 'many', 11 ),
00031             array( 'one', 91 ),
00032             array( 'one', 121 ),
00033             array( 'few', 2 ),
00034             array( 'few', 3 ),
00035             array( 'few', 4 ),
00036             array( 'few', 334 ),
00037             array( 'many', 5 ),
00038             array( 'many', 15 ),
00039             array( 'many', 120 ),
00040         );
00041     }
00042 }