summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageCyTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageCyTest.php')
-rw-r--r--tests/phpunit/languages/LanguageCyTest.php31
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/phpunit/languages/LanguageCyTest.php b/tests/phpunit/languages/LanguageCyTest.php
index e9f9e410..eaf663a8 100644
--- a/tests/phpunit/languages/LanguageCyTest.php
+++ b/tests/phpunit/languages/LanguageCyTest.php
@@ -6,24 +6,26 @@
*/
/** Tests for MediaWiki languages/classes/LanguageCy.php */
-class LanguageCyTest extends MediaWikiTestCase {
- private $lang;
-
- function setUp() {
- $this->lang = Language::factory( 'cy' );
- }
- function tearDown() {
- unset( $this->lang );
+class LanguageCyTest extends LanguageClassesTestCase {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
+ $forms = array( 'zero', 'one', 'two', 'few', 'many', 'other' );
+ $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providerPlural */
- function testPlural( $result, $value ) {
- $forms = array( 'zero', 'one', 'two', 'few', 'many', 'other' );
- $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) );
+ /**
+ * @dataProvider providePlural
+ * @covers Language::getPluralRuleType
+ */
+ public function testGetPluralRuleType( $result, $value ) {
+ $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
}
- function providerPlural() {
- return array (
+ public static function providePlural() {
+ return array(
array( 'zero', 0 ),
array( 'one', 1 ),
array( 'two', 2 ),
@@ -38,5 +40,4 @@ class LanguageCyTest extends MediaWikiTestCase {
array( 'other', 200.00 ),
);
}
-
}