Move ResultWrapper subclasses to Rdbms
[mediawiki.git] / tests / phpunit / languages / classes / LanguageRoTest.php
blobbbe26f63467339aa619e2302ee92a4d017d6280a
1 <?php
2 /**
3 * @author Amir E. Aharoni
4 * @copyright Copyright © 2012, Amir E. Aharoni
5 * @file
6 */
8 /** Tests for MediaWiki languages/classes/LanguageRo.php */
9 class LanguageRoTest extends LanguageClassesTestCase {
10 /**
11 * @dataProvider providePlural
12 * @covers Language::convertPlural
14 public function testPlural( $result, $value ) {
15 $forms = [ 'one', 'few', 'other' ];
16 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
19 /**
20 * @dataProvider providePlural
21 * @covers Language::getPluralRuleType
23 public function testGetPluralRuleType( $result, $value ) {
24 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
27 public static function providePlural() {
28 return [
29 [ 'few', 0 ],
30 [ 'one', 1 ],
31 [ 'few', 2 ],
32 [ 'few', 19 ],
33 [ 'other', 20 ],
34 [ 'other', 99 ],
35 [ 'other', 100 ],
36 [ 'few', 101 ],
37 [ 'few', 119 ],
38 [ 'other', 120 ],
39 [ 'other', 200 ],
40 [ 'few', 201 ],
41 [ 'few', 219 ],
42 [ 'other', 220 ],