summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageCuTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageCuTest.php')
-rw-r--r--tests/phpunit/languages/LanguageCuTest.php31
1 files changed, 20 insertions, 11 deletions
diff --git a/tests/phpunit/languages/LanguageCuTest.php b/tests/phpunit/languages/LanguageCuTest.php
index e2394b35..07193172 100644
--- a/tests/phpunit/languages/LanguageCuTest.php
+++ b/tests/phpunit/languages/LanguageCuTest.php
@@ -7,27 +7,36 @@
/** Tests for MediaWiki languages/LanguageCu.php */
class LanguageCuTest extends LanguageClassesTestCase {
-
- /** @dataProvider providerPlural */
- function testPlural( $result, $value ) {
- $forms = array( 'one', 'few', 'many', 'other' );
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
+ $forms = array( 'one', 'two', 'few', 'other' );
$this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- function providerPlural() {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
+ $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
+ }
+
+ public static function providePlural() {
return array(
array( 'other', 0 ),
array( 'one', 1 ),
- array( 'few', 2 ),
- array( 'many', 3 ),
- array( 'many', 4 ),
+ array( 'two', 2 ),
+ array( 'few', 3 ),
+ array( 'few', 4 ),
array( 'other', 5 ),
array( 'one', 11 ),
array( 'other', 20 ),
- array( 'few', 22 ),
- array( 'many', 223 ),
+ array( 'two', 22 ),
+ array( 'few', 223 ),
array( 'other', 200 ),
);
}
-
}