MediaWiki  REL1_22
LanguageLvTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageLvTest extends LanguageClassesTestCase {
00014     public function testPlural( $result, $value ) {
00015         $forms = array( 'zero', 'one', '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( 'zero', 0 ),
00030             array( 'one', 1 ),
00031             array( 'zero', 11 ),
00032             array( 'one', 21 ),
00033             array( 'zero', 411 ),
00034             array( 'other', 2 ),
00035             array( 'other', 9 ),
00036             array( 'zero', 12 ),
00037             array( 'other', 12.345 ),
00038             array( 'zero', 20 ),
00039             array( 'other', 22 ),
00040             array( 'one', 31 ),
00041             array( 'zero', 200 ),
00042         );
00043     }
00044 }