MediaWiki  REL1_22
LanguageSgsTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageSgsTest extends LanguageClassesTestCase {
00014     public function testPluralAllForms( $result, $value ) {
00015         $forms = array( 'one', 'two', 'few', '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 providePluralAllForms() {
00028         return array(
00029             array( 'few', 0 ),
00030             array( 'one', 1 ),
00031             array( 'two', 2 ),
00032             array( 'other', 3 ),
00033             array( 'few', 10 ),
00034             array( 'few', 11 ),
00035             array( 'few', 12 ),
00036             array( 'few', 19 ),
00037             array( 'other', 20 ),
00038             array( 'few', 100 ),
00039             array( 'one', 101 ),
00040             array( 'few', 111 ),
00041             array( 'few', 112 ),
00042         );
00043     }
00044 
00049     public function testPluralTwoForms( $result, $value ) {
00050         $forms = array( 'one', 'other' );
00051         $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00052     }
00053 
00054     public static function providePluralTwoForms() {
00055         return array(
00056             array( 'other', 0 ),
00057             array( 'one', 1 ),
00058             array( 'other', 2 ),
00059             array( 'other', 3 ),
00060             array( 'other', 10 ),
00061             array( 'other', 11 ),
00062             array( 'other', 12 ),
00063             array( 'other', 19 ),
00064             array( 'other', 20 ),
00065             array( 'other', 100 ),
00066             array( 'one', 101 ),
00067             array( 'other', 111 ),
00068             array( 'other', 112 ),
00069         );
00070     }
00071 }