summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageGvTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageGvTest.php')
-rw-r--r--tests/phpunit/languages/LanguageGvTest.php31
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/phpunit/languages/LanguageGvTest.php b/tests/phpunit/languages/LanguageGvTest.php
index a0def628..fc58022a 100644
--- a/tests/phpunit/languages/LanguageGvTest.php
+++ b/tests/phpunit/languages/LanguageGvTest.php
@@ -1,20 +1,19 @@
<?php
/**
+ * Test for Manx (Gaelg) language
+ *
* @author Santhosh Thottingal
- * @copyright Copyright © 2012, Santhosh Thottingal
+ * @copyright Copyright © 2013, Santhosh Thottingal
* @file
*/
-/** Tests for MediaWiki languages/classes/LanguageGv.php */
class LanguageGvTest extends LanguageClassesTestCase {
/**
* @dataProvider providePlural
* @covers Language::convertPlural
*/
public function testPlural( $result, $value ) {
- // This is not compatible with CLDR plural rules http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#gv
- // What does this mean? Is there a hard-coded override for gv somewhere? -Ryan Kaldari 2013-01-28
- $forms = array( 'Form 1', 'Form 2', 'Form 3', 'Form 4' );
+ $forms = array( 'one', 'two', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
@@ -23,21 +22,23 @@ class LanguageGvTest extends LanguageClassesTestCase {
* @covers Language::getPluralRuleType
*/
public function testGetPluralRuleType( $result, $value ) {
- $this->markTestSkipped( "This test won't work since convertPlural for gv doesn't seem to actually follow our plural rules." );
$this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
public static function providePlural() {
return array(
- array( 'Form 4', 0 ),
- array( 'Form 2', 1 ),
- array( 'Form 3', 2 ),
- array( 'Form 4', 3 ),
- array( 'Form 1', 20 ),
- array( 'Form 2', 21 ),
- array( 'Form 3', 22 ),
- array( 'Form 4', 23 ),
- array( 'Form 4', 50 ),
+ array( 'few', 0 ),
+ array( 'one', 1 ),
+ array( 'two', 2 ),
+ array( 'other', 3 ),
+ array( 'few', 20 ),
+ array( 'one', 21 ),
+ array( 'two', 22 ),
+ array( 'other', 23 ),
+ array( 'other', 50 ),
+ array( 'few', 60 ),
+ array( 'other', 80 ),
+ array( 'few', 100 )
);
}
}