Rename JsonUnserial… to JsonDeserial…
[mediawiki.git] / tests / phpunit / includes / languages / LanguageRoTest.php
blobdd44c2994f83e0bbbfc8cf3a13cb1b4ad0cec941
1 <?php
2 /**
3 * @author Amir E. Aharoni
4 * @copyright Copyright © 2012, Amir E. Aharoni
5 * @file
6 */
8 /**
9 * @group Language
11 class LanguageRoTest extends LanguageClassesTestCase {
12 /**
13 * @dataProvider providePlural
14 * @covers \Language::convertPlural
16 public function testPlural( $result, $value ) {
17 $forms = [ 'one', 'few', 'other' ];
18 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
21 /**
22 * @dataProvider providePlural
23 * @covers \Language::getPluralRuleType
25 public function testGetPluralRuleType( $result, $value ) {
26 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
29 public static function providePlural() {
30 return [
31 [ 'few', 0 ],
32 [ 'one', 1 ],
33 [ 'few', 2 ],
34 [ 'few', 19 ],
35 [ 'other', 20 ],
36 [ 'other', 99 ],
37 [ 'other', 100 ],
38 [ 'few', 101 ],
39 [ 'few', 119 ],
40 [ 'other', 120 ],
41 [ 'other', 200 ],
42 [ 'few', 201 ],
43 [ 'few', 219 ],
44 [ 'other', 220 ],