summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageDsbTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageDsbTest.php')
-rw-r--r--tests/phpunit/languages/LanguageDsbTest.php31
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/phpunit/languages/LanguageDsbTest.php b/tests/phpunit/languages/LanguageDsbTest.php
index ab7f9313..94c11bcc 100644
--- a/tests/phpunit/languages/LanguageDsbTest.php
+++ b/tests/phpunit/languages/LanguageDsbTest.php
@@ -6,24 +6,26 @@
*/
/** Tests for MediaWiki languages/classes/LanguageDsb.php */
-class LanguageDsbTest extends MediaWikiTestCase {
- private $lang;
-
- function setUp() {
- $this->lang = Language::factory( 'dsb' );
- }
- function tearDown() {
- unset( $this->lang );
+class LanguageDsbTest extends LanguageClassesTestCase {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
+ $forms = array( 'one', 'two', 'few', 'other' );
+ $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
- $forms = array( 'one', 'two', 'few', '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 providePlural() {
- return array (
+ public static function providePlural() {
+ return array(
array( 'other', 0 ),
array( 'one', 1 ),
array( 'one', 101 ),
@@ -36,5 +38,4 @@ class LanguageDsbTest extends MediaWikiTestCase {
array( 'other', 555 ),
);
}
-
}