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