MediaWiki  REL1_22
LanguageSlTest.php
Go to the documentation of this file.
00001 <?php
00010 class LanguageSlTest extends LanguageClassesTestCase {
00015     public function testPlural( $result, $value ) {
00016         $forms = array( 'one', 'two', 'few', 'other' );
00017         $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00018     }
00019 
00024     public function testGetPluralRuleType( $result, $value ) {
00025         $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
00026     }
00027 
00028     public static function providerPlural() {
00029         return array(
00030             array( 'other', 0 ),
00031             array( 'one', 1 ),
00032             array( 'two', 2 ),
00033             array( 'few', 3 ),
00034             array( 'few', 4 ),
00035             array( 'other', 5 ),
00036             array( 'other', 99 ),
00037             array( 'other', 100 ),
00038             array( 'one', 101 ),
00039             array( 'two', 102 ),
00040             array( 'few', 103 ),
00041             array( 'one', 201 ),
00042         );
00043     }
00044 }