From 224b22a051051f6c2e494c3a2fb4adb42898e2d1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Tue, 14 Jan 2014 19:24:18 +0100 Subject: Update to MediaWiki 1.22.1 --- tests/phpunit/languages/LanguageUkTest.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'tests/phpunit/languages/LanguageUkTest.php') diff --git a/tests/phpunit/languages/LanguageUkTest.php b/tests/phpunit/languages/LanguageUkTest.php index 0783fcf6..9051bcff 100644 --- a/tests/phpunit/languages/LanguageUkTest.php +++ b/tests/phpunit/languages/LanguageUkTest.php @@ -6,7 +6,7 @@ * @file */ -/** Tests for MediaWiki languages/classes/LanguageUk.php */ +/** Tests for Ukrainian */ class LanguageUkTest extends LanguageClassesTestCase { /** * @dataProvider providePlural @@ -17,6 +17,17 @@ class LanguageUkTest extends LanguageClassesTestCase { $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); } + /** + * Test explicit plural forms - n=FormN forms + * @covers Language::convertPlural + */ + public function testExplicitPlural() { + $forms = array( 'one', 'few', 'many', 'other', '12=dozen' ); + $this->assertEquals( 'dozen', $this->getLang()->convertPlural( 12, $forms ) ); + $forms = array( 'one', 'few', 'many', '100=hundred', 'other', '12=dozen' ); + $this->assertEquals( 'hundred', $this->getLang()->convertPlural( 100, $forms ) ); + } + /** * @dataProvider providePlural * @covers Language::getPluralRuleType @@ -46,7 +57,7 @@ class LanguageUkTest extends LanguageClassesTestCase { * @covers Language::convertPlural */ public function testPluralTwoForms( $result, $value ) { - $forms = array( 'one', 'other' ); + $forms = array( '1=one', 'other' ); $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); } -- cgit v1.2.2