MediaWiki  REL1_21
LanguageGdTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageGdTest extends LanguageClassesTestCase {
00010 
00012         function testPlural( $result, $value ) {
00013                 $forms = array( 'one', 'two', 'few', 'other' );
00014                 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00015         }
00016 
00017         function providerPlural() {
00018                 return array (
00019                         array( 'other', 0 ),
00020                         array( 'one', 1 ),
00021                         array( 'two', 2 ),
00022                         array( 'one', 11 ),
00023                         array( 'two', 12 ),
00024                         array( 'few', 3 ),
00025                         array( 'few', 19 ),
00026                         array( 'other', 200 ),
00027                 );
00028         }
00029 
00031         function testExplicitPlural( $result, $value ) {
00032                 $forms = array( 'one', 'two', 'few', 'other', '11=Form11', '12=Form12' );
00033                 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00034         }
00035 
00036         function providerPluralExplicit() {
00037                 return array (
00038                                 array( 'other', 0 ),
00039                                 array( 'one', 1 ),
00040                                 array( 'two', 2 ),
00041                                 array( 'Form11', 11 ),
00042                                 array( 'Form12', 12 ),
00043                                 array( 'few', 3 ),
00044                                 array( 'few', 19 ),
00045                                 array( 'other', 200 ),
00046                 );
00047         }
00048 }