diff options
Diffstat (limited to 'tests/phpunit/languages/LanguageFrTest.php')
-rw-r--r-- | tests/phpunit/languages/LanguageFrTest.php | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/phpunit/languages/LanguageFrTest.php b/tests/phpunit/languages/LanguageFrTest.php index 8538744e..46b65011 100644 --- a/tests/phpunit/languages/LanguageFrTest.php +++ b/tests/phpunit/languages/LanguageFrTest.php @@ -6,29 +6,30 @@ */ /** Tests for MediaWiki languages/classes/LanguageFr.php */ -class LanguageFrTest extends MediaWikiTestCase { - private $lang; - - function setUp() { - $this->lang = Language::factory( 'fr' ); - } - function tearDown() { - unset( $this->lang ); +class LanguageFrTest 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 providePlural */ - 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 providePlural() { - return array ( + public static function providePlural() { + return array( array( 'one', 0 ), array( 'one', 1 ), array( 'other', 2 ), array( 'other', 200 ), ); } - } |