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