3 * @author Santhosh Thottingal
4 * @copyright Copyright © 2012, Santhosh Thottingal
8 /** Tests for MediaWiki languages/classes/LanguageGv.php */
9 class LanguageGvTest
extends LanguageClassesTestCase
{
11 * @dataProvider providePlural
12 * @covers Language::convertPlural
14 public function testPlural( $result, $value ) {
15 // This is not compatible with CLDR plural rules http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#gv
16 // What does this mean? Is there a hard-coded override for gv somewhere? -Ryan Kaldari 2013-01-28
17 $forms = array( 'Form 1', 'Form 2', 'Form 3', 'Form 4' );
18 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
22 * @dataProvider providePlural
23 * @covers Language::getPluralRuleType
25 public function testGetPluralRuleType( $result, $value ) {
26 $this->markTestSkipped( "This test won't work since convertPlural for gv doesn't seem to actually follow our plural rules." );
27 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
30 public static function providePlural() {
36 array( 'Form 1', 20 ),
37 array( 'Form 2', 21 ),
38 array( 'Form 3', 22 ),
39 array( 'Form 4', 23 ),
40 array( 'Form 4', 50 ),