diff options
Diffstat (limited to 'tests/phpunit/languages/LanguageTlTest.php')
-rw-r--r-- | tests/phpunit/languages/LanguageTlTest.php | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/tests/phpunit/languages/LanguageTlTest.php b/tests/phpunit/languages/LanguageTlTest.php index a1facd14..7ac51c69 100644 --- a/tests/phpunit/languages/LanguageTlTest.php +++ b/tests/phpunit/languages/LanguageTlTest.php @@ -6,27 +6,29 @@ */ /** Tests for MediaWiki languages/classes/LanguageTl.php */ -class LanguageTlTest extends MediaWikiTestCase { - private $lang; - - function setUp() { - $this->lang = Language::factory( 'Tl' ); - } - function tearDown() { - unset( $this->lang ); +class LanguageTlTest 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', 'many' ); - $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 ( - array( 'one', 0 ), - array( 'one', 1 ), - array( 'many', 2 ), + public static function providePlural() { + return array( + array( 'one', 0 ), + array( 'one', 1 ), + array( 'other', 2 ), ); } } |