MediaWiki  REL1_19
LanguageLtTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageLtTest extends MediaWikiTestCase {
00010         private $lang;
00011 
00012         function setUp() {
00013                 $this->lang = Language::factory( 'Lt' );
00014         }
00015         function tearDown() {
00016                 unset( $this->lang );
00017         }
00018 
00020         function testOneFewOtherPlural( $result, $value ) {
00021                 $forms =  array( 'one', 'few', 'other' );
00022                 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
00023         }
00024         
00026         function testOneFewPlural( $result, $value ) {
00027                 $forms =  array( 'one', 'few' );
00028                 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
00029         }
00030 
00031         function provideOneFewOtherCases() {
00032                 return array (
00033                         array( 'other', 0 ),
00034                         array( 'one', 1 ),
00035                         array( 'few', 2 ),
00036                         array( 'few', 9 ),
00037                         array( 'other', 10 ),
00038                         array( 'other', 11 ),
00039                         array( 'other', 20 ),
00040                         array( 'one', 21 ),
00041                         array( 'few', 32 ),
00042                         array( 'one', 41 ),
00043                         array( 'one', 40001 ),
00044                 );
00045         }
00046         
00047         function provideOneFewCases() {
00048                 return array (
00049                         array( 'one', 1 ),
00050                         array( 'few', 15 ),
00051                 );
00052         }
00053 }