diff options
Diffstat (limited to 'tests/phpunit/languages/LanguageUkTest.php')
-rw-r--r-- | tests/phpunit/languages/LanguageUkTest.php | 15 |
1 files changed, 13 insertions, 2 deletions
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 @@ -18,6 +18,17 @@ class LanguageUkTest extends LanguageClassesTestCase { } /** + * 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 ) ); } |