diff options
Diffstat (limited to 'tests/phpunit/languages/LanguageGaTest.php')
-rw-r--r-- | tests/phpunit/languages/LanguageGaTest.php | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/phpunit/languages/LanguageGaTest.php b/tests/phpunit/languages/LanguageGaTest.php index fbd9f11d..c009f56b 100644 --- a/tests/phpunit/languages/LanguageGaTest.php +++ b/tests/phpunit/languages/LanguageGaTest.php @@ -6,29 +6,30 @@ */ /** Tests for MediaWiki languages/classes/LanguageGa.php */ -class LanguageGaTest extends MediaWikiTestCase { - private $lang; - - function setUp() { - $this->lang = Language::factory( 'ga' ); - } - function tearDown() { - unset( $this->lang ); +class LanguageGaTest extends LanguageClassesTestCase { + /** + * @dataProvider providePlural + * @covers Language::convertPlural + */ + public function testPlural( $result, $value ) { + $forms = array( 'one', 'two', 'other' ); + $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); } - /** @dataProvider providerPlural */ - function testPlural( $result, $value ) { - $forms = array( 'one', 'two', '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( 'two', 2 ), array( 'other', 200 ), ); } - } |