summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageKshTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageKshTest.php')
-rw-r--r--tests/phpunit/languages/LanguageKshTest.php31
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/phpunit/languages/LanguageKshTest.php b/tests/phpunit/languages/LanguageKshTest.php
index ab889464..568a3780 100644
--- a/tests/phpunit/languages/LanguageKshTest.php
+++ b/tests/phpunit/languages/LanguageKshTest.php
@@ -6,29 +6,30 @@
*/
/** Tests for MediaWiki languages/classes/LanguageKsh.php */
-class LanguageKshTest extends MediaWikiTestCase {
- private $lang;
-
- function setUp() {
- $this->lang = Language::factory( 'ksh' );
- }
- function tearDown() {
- unset( $this->lang );
+class LanguageKshTest extends LanguageClassesTestCase {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
+ $forms = array( 'one', 'other', 'zero' );
+ $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providerPlural */
- function testPlural( $result, $value ) {
- $forms = array( 'one', 'other', 'zero' );
- $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( 'other', 2 ),
array( 'other', 200 ),
);
}
-
}