summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageUkTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-01-14 19:24:18 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-01-14 19:24:18 +0100
commit224b22a051051f6c2e494c3a2fb4adb42898e2d1 (patch)
tree85a41a4cf8533bf740ec4c8d3affce88414daa56 /tests/phpunit/languages/LanguageUkTest.php
parent9937b8e6d6a8b4517c04c143daaf9ebd42ce8ba0 (diff)
Update to MediaWiki 1.22.1
Diffstat (limited to 'tests/phpunit/languages/LanguageUkTest.php')
-rw-r--r--tests/phpunit/languages/LanguageUkTest.php15
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 ) );
}