MediaWiki  REL1_21
LanguageSgsTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageSgsTest extends LanguageClassesTestCase {
00010 
00012         function testPluralAllForms( $result, $value ) {
00013                 $forms = array( 'one', 'two', 'few', 'other' );
00014                 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00015         }
00016 
00017         function providePluralAllForms() {
00018                 return array(
00019                         array( 'few', 0 ),
00020                         array( 'one', 1 ),
00021                         array( 'two', 2 ),
00022                         array( 'other', 3 ),
00023                         array( 'few', 10 ),
00024                         array( 'few', 11 ),
00025                         array( 'few', 12 ),
00026                         array( 'few', 19 ),
00027                         array( 'other', 20 ),
00028                         array( 'few', 100 ),
00029                         array( 'one', 101 ),
00030                         array( 'few', 111 ),
00031                         array( 'few', 112 ),
00032                 );
00033         }
00034 
00036         function testPluralTwoForms( $result, $value ) {
00037                 $forms = array( 'one', 'other' );
00038                 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
00039         }
00040 
00041         function providePluralTwoForms() {
00042                 return array(
00043                         array( 'other', 0 ),
00044                         array( 'one', 1 ),
00045                         array( 'other', 2 ),
00046                         array( 'other', 3 ),
00047                         array( 'other', 10 ),
00048                         array( 'other', 11 ),
00049                         array( 'other', 12 ),
00050                         array( 'other', 19 ),
00051                         array( 'other', 20 ),
00052                         array( 'other', 100 ),
00053                         array( 'one', 101 ),
00054                         array( 'other', 111 ),
00055                         array( 'other', 112 ),
00056                 );
00057         }
00058 }