From 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Dec 2013 09:55:49 +0100 Subject: Update to MediaWiki 1.22.0 --- tests/phpunit/languages/LanguageRuTest.php | 44 ++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 14 deletions(-) (limited to 'tests/phpunit/languages/LanguageRuTest.php') 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( 'Википедии', -- cgit v1.2.2