Merge "Skip 64 bit MWMessagePack tests on 32 bit machines"
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageRoTest.php
1 <?php
2 /**
3 * @author Amir E. Aharoni
4 * @copyright Copyright © 2012, Amir E. Aharoni
5 * @file
6 */
7
8 /** Tests for MediaWiki languages/classes/LanguageRo.php */
9 class LanguageRoTest extends LanguageClassesTestCase {
10 /**
11 * @dataProvider providePlural
12 * @covers Language::convertPlural
13 */
14 public function testPlural( $result, $value ) {
15 $forms = array( 'one', 'few', 'other' );
16 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
17 }
18
19 /**
20 * @dataProvider providePlural
21 * @covers Language::getPluralRuleType
22 */
23 public function testGetPluralRuleType( $result, $value ) {
24 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
25 }
26
27 public static function providePlural() {
28 return array(
29 array( 'few', 0 ),
30 array( 'one', 1 ),
31 array( 'few', 2 ),
32 array( 'few', 19 ),
33 array( 'other', 20 ),
34 array( 'other', 99 ),
35 array( 'other', 100 ),
36 array( 'few', 101 ),
37 array( 'few', 119 ),
38 array( 'other', 120 ),
39 array( 'other', 200 ),
40 array( 'few', 201 ),
41 array( 'few', 219 ),
42 array( 'other', 220 ),
43 );
44 }
45 }