summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageUkTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageUkTest.php')
-rw-r--r--tests/phpunit/languages/LanguageUkTest.php35
1 files changed, 24 insertions, 11 deletions
diff --git a/tests/phpunit/languages/LanguageUkTest.php b/tests/phpunit/languages/LanguageUkTest.php
index 9bbfaf66..0783fcf6 100644
--- a/tests/phpunit/languages/LanguageUkTest.php
+++ b/tests/phpunit/languages/LanguageUkTest.php
@@ -8,14 +8,24 @@
/** Tests for MediaWiki languages/classes/LanguageUk.php */
class LanguageUkTest 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,18 +41,21 @@ class LanguageUkTest 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 ),
);
}
}