Merge "Allow the retrieval of the plural rule type for a given number"
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageGvTest.php
index 18cf225..6e24aea 100644 (file)
@@ -6,23 +6,22 @@
  */
 
 /** Tests for MediaWiki languages/classes/LanguageGv.php */
-class LanguageGvTest extends MediaWikiTestCase {
-       private $lang;
-
-       protected function setUp() {
-               $this->lang = Language::factory( 'gv' );
-       }
-       protected function tearDown() {
-               unset( $this->lang );
-       }
-
-       /** @dataProvider providerPlural */
+class LanguageGvTest extends LanguageClassesTestCase {
+       /** @dataProvider providePlural */
        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' );
-               $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
+               $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
-       function providerPlural() {
+
+       /** @dataProvider providePlural */
+       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 ) );
+       }
+
+       function providePlural() {
                return array (
                        array( 'Form 4', 0 ),
                        array( 'Form 2', 1 ),
@@ -35,5 +34,4 @@ class LanguageGvTest extends MediaWikiTestCase {
                        array( 'Form 4', 50 ),
                );
        }
-
 }