Merge "(bug 32297) Use symbolic names, not offsets for a default timezone."
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageCyTest.php
1 <?php
2 /**
3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
5 * @file
6 */
7
8 /** Tests for MediaWiki languages/classes/LanguageCy.php */
9 class LanguageCyTest extends MediaWikiTestCase {
10 private $lang;
11
12 function setUp() {
13 $this->lang = Language::factory( 'cy' );
14 }
15 function tearDown() {
16 unset( $this->lang );
17 }
18
19 /** @dataProvider providerPlural */
20 function testPlural( $result, $value ) {
21 $forms = array( 'zero', 'one', 'two', 'few', 'many', 'other' );
22 $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
23 }
24
25 function providerPlural() {
26 return array (
27 array( 'zero', 0 ),
28 array( 'one', 1 ),
29 array( 'two', 2 ),
30 array( 'few', 3 ),
31 array( 'many', 6 ),
32 array( 'other', 4 ),
33 array( 'other', 5 ),
34 array( 'other', 11 ),
35 array( 'other', 20 ),
36 array( 'other', 22 ),
37 array( 'other', 223 ),
38 array( 'other', 200.00 ),
39 );
40 }
41
42 }