MediaWiki  REL1_22
LanguageSeTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageSeTest extends LanguageClassesTestCase {
00014     public function testPlural( $result, $value ) {
00015         $forms = array( 'one', 'two', '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( 'other', 0 ),
00030             array( 'one', 1 ),
00031             array( 'two', 2 ),
00032             array( 'other', 3 ),
00033         );
00034     }
00035 
00040     public function testPluralTwoForms( $result, $value ) {
00041         $forms = array( 'one', 'other' );
00042         $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00043     }
00044 
00045     public static function providePluralTwoForms() {
00046         return array(
00047             array( 'other', 0 ),
00048             array( 'one', 1 ),
00049             array( 'other', 2 ),
00050             array( 'other', 3 ),
00051         );
00052     }
00053 }