summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageBeTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageBeTest.php')
-rw-r--r--tests/phpunit/languages/LanguageBeTest.php30
1 files changed, 16 insertions, 14 deletions
diff --git a/tests/phpunit/languages/LanguageBeTest.php b/tests/phpunit/languages/LanguageBeTest.php
index 735ccc63..7bd586af 100644
--- a/tests/phpunit/languages/LanguageBeTest.php
+++ b/tests/phpunit/languages/LanguageBeTest.php
@@ -6,24 +6,26 @@
*/
/** Tests for MediaWiki languages/LanguageBe.php */
-class LanguageBeTest extends MediaWikiTestCase {
- private $lang;
-
- function setUp() {
- $this->lang = Language::factory( 'Be' );
- }
- function tearDown() {
- unset( $this->lang );
+class LanguageBeTest extends LanguageClassesTestCase {
+ /**
+ * @dataProvider providePlural
+ * @covers Language::convertPlural
+ */
+ public function testPlural( $result, $value ) {
+ $forms = array( 'one', 'few', 'many', 'other' );
+ $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
}
- /** @dataProvider providePlural */
- function testPlural( $result, $value ) {
- $forms = array( 'one', '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 providePlural() {
- return array (
+ public static function providePlural() {
+ return array(
array( 'one', 1 ),
array( 'many', 11 ),
array( 'one', 91 ),