MediaWiki  REL1_21
LanguageLtTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageLtTest extends LanguageClassesTestCase {
00010 
00012         function testOneFewOtherPlural( $result, $value ) {
00013                 $forms = array( 'one', 'few', 'other' );
00014                 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00015         }
00016 
00018         function testOneFewPlural( $result, $value ) {
00019                 $forms = array( 'one', 'few' );
00020                 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00021         }
00022 
00023         function provideOneFewOtherCases() {
00024                 return array(
00025                         array( 'other', 0 ),
00026                         array( 'one', 1 ),
00027                         array( 'few', 2 ),
00028                         array( 'few', 9 ),
00029                         array( 'other', 10 ),
00030                         array( 'other', 11 ),
00031                         array( 'other', 20 ),
00032                         array( 'one', 21 ),
00033                         array( 'few', 32 ),
00034                         array( 'one', 41 ),
00035                         array( 'one', 40001 ),
00036                 );
00037         }
00038 
00039         function provideOneFewCases() {
00040                 return array(
00041                         array( 'one', 1 ),
00042                         array( 'few', 15 ),
00043                 );
00044         }
00045 }