MediaWiki  REL1_19
LanguageHeTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageHeTest extends MediaWikiTestCase {
00010         private $lang;
00011 
00012         function setUp() {
00013                 $this->lang = Language::factory( 'he' );
00014         }
00015         function tearDown() {
00016                 unset( $this->lang );
00017         }
00018 
00020         function testPluralDual( $result, $value ) {
00021                 $forms = array( 'one', 'many', 'two' );
00022                 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
00023         }
00024 
00025         function providerPluralDual() {
00026                 return array (
00027                         array( 'many', 0 ), // Zero -> plural
00028                         array( 'one', 1 ), // Singular
00029                         array( 'two', 2 ), // Dual
00030                         array( 'many', 3 ), // Plural
00031                 );
00032         }
00033 
00035         function testPlural( $result, $value ) {
00036                 $forms = array( 'one', 'many' );
00037                 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
00038         }
00039 
00040         function providerPlural() {
00041                 return array (
00042                         array( 'many', 0 ), // Zero -> plural
00043                         array( 'one', 1 ), // Singular
00044                         array( 'many', 2 ), // Plural, no dual provided
00045                         array( 'many', 3 ), // Plural
00046                 );
00047         }
00048 }