X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Flanguages%2FLanguageMtTest.php;h=96d2bc92aff578fc605cd99823373e0a124cb811;hb=ddff639b7566f72f0c2dda302280de2ee6774b7f;hp=350aa082c9197b2f213a9a2be0afe015950a689d;hpb=64797b281d1d8f3221aa61a00a36922b961f3922;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/languages/LanguageMtTest.php b/tests/phpunit/languages/LanguageMtTest.php index 350aa082c9..96d2bc92af 100644 --- a/tests/phpunit/languages/LanguageMtTest.php +++ b/tests/phpunit/languages/LanguageMtTest.php @@ -7,25 +7,31 @@ /** Tests for MediaWiki languages/classes/LanguageMt.php */ class LanguageMtTest extends LanguageClassesTestCase { - /** @dataProvider providePlural */ - function testPlural( $result, $value ) { + /** + * @dataProvider providePlural + * @covers Language::convertPlural + */ + public function testPlural( $result, $value ) { $forms = array( 'one', 'few', 'many', 'other' ); $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); } - /** @dataProvider providePlural */ - function testGetPluralRuleType( $result, $value ) { + /** + * @dataProvider providePlural + * @covers Language::getPluralRuleType + */ + public function testGetPluralRuleType( $result, $value ) { $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) ); } public static function providePlural() { - return array ( - array( 'few', 0 ), - array( 'one', 1 ), - array( 'few', 2 ), - array( 'few', 10 ), - array( 'many', 11 ), - array( 'many', 19 ), + return array( + array( 'few', 0 ), + array( 'one', 1 ), + array( 'few', 2 ), + array( 'few', 10 ), + array( 'many', 11 ), + array( 'many', 19 ), array( 'other', 20 ), array( 'other', 99 ), array( 'other', 100 ), @@ -39,30 +45,33 @@ class LanguageMtTest extends LanguageClassesTestCase { ); } - /** @dataProvider providerPluralTwoForms */ - function testPluralTwoForms( $result, $value ) { + /** + * @dataProvider providePluralTwoForms + * @covers Language::convertPlural + */ + public function testPluralTwoForms( $result, $value ) { $forms = array( 'one', 'other' ); $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); } - public static function providerPluralTwoForms() { - return array ( - array( 'other', 0 ), - array( 'one', 1 ), - array( 'other', 2 ), - array( 'other', 10 ), - array( 'other', 11 ), - array( 'other', 19 ), - array( 'other', 20 ), - array( 'other', 99 ), - array( 'other', 100 ), - array( 'other', 101 ), - array( 'other', 102 ), - array( 'other', 110 ), - array( 'other', 111 ), - array( 'other', 119 ), - array( 'other', 120 ), - array( 'other', 201 ), + public static function providePluralTwoForms() { + return array( + array( 'other', 0 ), + array( 'one', 1 ), + array( 'other', 2 ), + array( 'other', 10 ), + array( 'other', 11 ), + array( 'other', 19 ), + array( 'other', 20 ), + array( 'other', 99 ), + array( 'other', 100 ), + array( 'other', 101 ), + array( 'other', 102 ), + array( 'other', 110 ), + array( 'other', 111 ), + array( 'other', 119 ), + array( 'other', 120 ), + array( 'other', 201 ), ); } }