Merge "Use MessageCache::getMsgFromNamespace() to fetch conversion tables."
[lhc/web/wiklou.git] / tests / phpunit / languages / LanguageRuTest.php
index 0792f75..bfd5074 100644 (file)
@@ -8,14 +8,18 @@
 
 /** Tests for MediaWiki languages/classes/LanguageRu.php */
 class LanguageRuTest extends LanguageClassesTestCase {
-
-       /** @dataProvider providePluralFourForms */
-       function testPluralFourForms( $result, $value ) {
+       /** @dataProvider providePlural */
+       function testPlural( $result, $value ) {
                $forms = array( 'one', 'few', 'many', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
-       function providePluralFourForms() {
+       /** @dataProvider providePlural */
+       function testGetPluralRuleType( $result, $value ) {
+               $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
+       }
+
+       public static function providePlural() {
                return array(
                        array( 'one', 1 ),
                        array( 'many', 11 ),
@@ -33,16 +37,16 @@ class LanguageRuTest extends LanguageClassesTestCase {
 
        /** @dataProvider providePluralTwoForms */
        function testPluralTwoForms( $result, $value ) {
-               $forms = array( 'one', 'several' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
-       function providePluralTwoForms() {
+       public static function providePluralTwoForms() {
                return array(
                        array( 'one', 1 ),
-                       array( 'several', 11 ),
-                       array( 'several', 91 ),
-                       array( 'several', 121 ),
+                       array( 'other', 11 ),
+                       array( 'other', 91 ),
+                       array( 'other', 121 ),
                );
        }
 
@@ -51,7 +55,7 @@ class LanguageRuTest extends LanguageClassesTestCase {
                $this->assertEquals( $result, $this->getLang()->convertGrammar( $word, $case ) );
        }
 
-       function providerGrammar() {
+       public static function providerGrammar() {
                return array(
                        array(
                                'Википедии',