MediaWiki  REL1_19
LanguageCyTest.php
Go to the documentation of this file.
00001 <?php
00009 class LanguageCyTest extends MediaWikiTestCase {
00010         private $lang;
00011 
00012         function setUp() {
00013                 $this->lang = Language::factory( 'cy' );
00014         }
00015         function tearDown() {
00016                 unset( $this->lang );
00017         }
00018 
00020         function testPlural( $result, $value ) {
00021                 $forms =  array( 'zero', 'one', 'two', 'few', 'many', 'other' );
00022                 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
00023         }
00024 
00025         function providerPlural() {
00026                 return array (
00027                         array( 'zero', 0 ),
00028                         array( 'one', 1 ),
00029                         array( 'two', 2 ),
00030                         array( 'few', 3 ),
00031                         array( 'many', 6 ),
00032                         array( 'other', 4 ),
00033                         array( 'other', 5 ),
00034                         array( 'other', 11 ),
00035                         array( 'other', 20 ),
00036                         array( 'other', 22 ),
00037                         array( 'other', 223 ),
00038                         array( 'other', 200.00 ),
00039                 );
00040         }
00041 
00042 }