MediaWiki
REL1_19
|
00001 <?php 00009 class LanguageGdTest extends MediaWikiTestCase { 00010 private $lang; 00011 00012 function setUp() { 00013 $this->lang = Language::factory( 'gd' ); 00014 } 00015 function tearDown() { 00016 unset( $this->lang ); 00017 } 00018 00020 function testPlural( $result, $value ) { 00021 // The CLDR ticket for this plural forms is not same as mw plural forms. See http://unicode.org/cldr/trac/ticket/2883 00022 $forms = array( 'Form 1', 'Form 2', 'Form 3', 'Form 4', 'Form 5', 'Form 6' ); 00023 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) ); 00024 } 00025 function providerPlural() { 00026 return array ( 00027 array( 'Form 6', 0 ), 00028 array( 'Form 1', 1 ), 00029 array( 'Form 2', 2 ), 00030 array( 'Form 3', 11 ), 00031 array( 'Form 4', 12 ), 00032 array( 'Form 5', 3 ), 00033 array( 'Form 5', 19 ), 00034 array( 'Form 6', 200 ), 00035 ); 00036 } 00037 00038 }