diff options
Diffstat (limited to 'tests/phpunit/languages/LanguageRuTest.php')
-rw-r--r-- | tests/phpunit/languages/LanguageRuTest.php | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/tests/phpunit/languages/LanguageRuTest.php b/tests/phpunit/languages/LanguageRuTest.php index 0792f75b..e938be79 100644 --- a/tests/phpunit/languages/LanguageRuTest.php +++ b/tests/phpunit/languages/LanguageRuTest.php @@ -8,14 +8,24 @@ /** Tests for MediaWiki languages/classes/LanguageRu.php */ class LanguageRuTest extends LanguageClassesTestCase { - - /** @dataProvider providePluralFourForms */ - function testPluralFourForms( $result, $value ) { + /** + * @dataProvider providePlural + * @covers Language::convertPlural + */ + public function testPlural( $result, $value ) { $forms = array( 'one', 'few', 'many', 'other' ); $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); } - function providePluralFourForms() { + /** + * @dataProvider providePlural + * @covers Language::getPluralRuleType + */ + public function testGetPluralRuleType( $result, $value ) { + $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) ); + } + + public static function providePlural() { return array( array( 'one', 1 ), array( 'many', 11 ), @@ -31,27 +41,33 @@ class LanguageRuTest extends LanguageClassesTestCase { ); } - /** @dataProvider providePluralTwoForms */ - function testPluralTwoForms( $result, $value ) { - $forms = array( 'one', 'several' ); + /** + * @dataProvider providePluralTwoForms + * @covers Language::convertPlural + */ + public function testPluralTwoForms( $result, $value ) { + $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 ), ); } - /** @dataProvider providerGrammar */ - function testGrammar( $result, $word, $case ) { + /** + * @dataProvider providerGrammar + * @covers Language::convertGrammar + */ + public function testGrammar( $result, $word, $case ) { $this->assertEquals( $result, $this->getLang()->convertGrammar( $word, $case ) ); } - function providerGrammar() { + public static function providerGrammar() { return array( array( 'Википедии', |