summaryrefslogtreecommitdiff
path: root/tests/phpunit/languages/LanguageHyTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/languages/LanguageHyTest.php')
-rw-r--r--tests/phpunit/languages/LanguageHyTest.php33
1 files changed, 17 insertions, 16 deletions
diff --git a/tests/phpunit/languages/LanguageHyTest.php b/tests/phpunit/languages/LanguageHyTest.php
index 7990bdfc..92e0ef94 100644
--- a/tests/phpunit/languages/LanguageHyTest.php
+++ b/tests/phpunit/languages/LanguageHyTest.php
@@ -5,30 +5,31 @@
* @file
*/
-/** Tests for MediaWiki languages/LanguageHy.php */
-class LanguageHyTest extends MediaWikiTestCase {
- private $lang;
-
- function setUp() {
- $this->lang = Language::factory( 'hy' );
- }
- function tearDown() {
- unset( $this->lang );
+/** Tests for Armenian (Հայերեն) */
+class LanguageHyTest 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 providerPlural */
- 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 providerPlural() {
- return array (
+ public static function providePlural() {
+ return array(
array( 'one', 0 ),
array( 'one', 1 ),
array( 'other', 2 ),
array( 'other', 200 ),
);
}
-
}