Merge "For rows added by the SpecialStatsAddExtra hook, add an HTML id of "mw-" plus...
[mediawiki.git] / tests / phpunit / languages / LanguageRoTest.php
blob919a744cd2396aabcdf82b736d12d230cabd6430
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 /** @dataProvider providePlural */
11 function testPlural( $result, $value ) {
12 $forms = array( 'one', 'few', 'other' );
13 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
16 /** @dataProvider providePlural */
17 function testGetPluralRuleType( $result, $value ) {
18 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
21 public static function providePlural() {
22 return array(
23 array( 'few', 0 ),
24 array( 'one', 1 ),
25 array( 'few', 2 ),
26 array( 'few', 19 ),
27 array( 'other', 20 ),
28 array( 'other', 99 ),
29 array( 'other', 100 ),
30 array( 'few', 101 ),
31 array( 'few', 119 ),
32 array( 'other', 120 ),
33 array( 'other', 200 ),
34 array( 'few', 201 ),
35 array( 'few', 219 ),
36 array( 'other', 220 ),