summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageMtTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageMtTest.php')
-rw-r--r--tests/phpunit/languages/LanguageMtTest.php59
1 files changed, 36 insertions, 23 deletions
diff --git a/tests/phpunit/languages/LanguageMtTest.php b/tests/phpunit/languages/LanguageMtTest.php
index f2b881e7..96d2bc92 100644
--- a/tests/phpunit/languages/LanguageMtTest.php
+++ b/tests/phpunit/languages/LanguageMtTest.php
@@ -7,14 +7,24 @@
/** Tests for MediaWiki languages/classes/LanguageMt.php */
class LanguageMtTest extends LanguageClassesTestCase {
-
- /** @dataProvider providerPluralAllForms */
- function testPluralAllForms( $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 providerPluralAllForms() {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
+ $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
+ }
+
+ public static function providePlural() {
return array(
array( 'few', 0 ),
array( 'one', 1 ),
@@ -35,30 +45,33 @@ class LanguageMtTest extends LanguageClassesTestCase {
);
}
- /** @dataProvider providerPluralTwoForms */
- function testPluralTwoForms( $result, $value ) {
- $forms = array( 'one', 'many' );
+ /**
+ * @dataProvider providePluralTwoForms
+ * @covers Language::convertPlural
+ */
+ public function testPluralTwoForms( $result, $value ) {
+ $forms = array( 'one', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- function providerPluralTwoForms() {
+ public static function providePluralTwoForms() {
return array(
- array( 'many', 0 ),
+ array( 'other', 0 ),
array( 'one', 1 ),
- array( 'many', 2 ),
- array( 'many', 10 ),
- array( 'many', 11 ),
- array( 'many', 19 ),
- array( 'many', 20 ),
- array( 'many', 99 ),
- array( 'many', 100 ),
- array( 'many', 101 ),
- array( 'many', 102 ),
- array( 'many', 110 ),
- array( 'many', 111 ),
- array( 'many', 119 ),
- array( 'many', 120 ),
- array( 'many', 201 ),
+ array( 'other', 2 ),
+ array( 'other', 10 ),
+ array( 'other', 11 ),
+ array( 'other', 19 ),
+ array( 'other', 20 ),
+ array( 'other', 99 ),
+ array( 'other', 100 ),
+ array( 'other', 101 ),
+ array( 'other', 102 ),
+ array( 'other', 110 ),
+ array( 'other', 111 ),
+ array( 'other', 119 ),
+ array( 'other', 120 ),
+ array( 'other', 201 ),
);
}
}