diff options
Diffstat (limited to 'tests/phpunit/languages/LanguageHsbTest.php')
-rw-r--r-- | tests/phpunit/languages/LanguageHsbTest.php | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/phpunit/languages/LanguageHsbTest.php b/tests/phpunit/languages/LanguageHsbTest.php index 803c7721..f95a43bf 100644 --- a/tests/phpunit/languages/LanguageHsbTest.php +++ b/tests/phpunit/languages/LanguageHsbTest.php @@ -6,24 +6,26 @@ */ /** Tests for MediaWiki languages/classes/LanguageHsb.php */ -class LanguageHsbTest extends MediaWikiTestCase { - private $lang; - - function setUp() { - $this->lang = Language::factory( 'hsb' ); - } - function tearDown() { - unset( $this->lang ); +class LanguageHsbTest 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 LanguageHsbTest extends MediaWikiTestCase { array( 'other', 555 ), ); } - } |