X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Flanguages%2FLanguageSmaTest.php;h=58198317acfb8b067a11c53185e00bfd42c62ea9;hb=fb096ec3395cdb08723b9dbdcb8ecebe1b950396;hp=85fa9fbf55991e5a601b1dff4acb9708389cdbdc;hpb=b394616ebd372b56d6b1ad890c5b2b216989d90f;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/languages/LanguageSmaTest.php b/tests/phpunit/languages/LanguageSmaTest.php index 85fa9fbf55..58198317ac 100644 --- a/tests/phpunit/languages/LanguageSmaTest.php +++ b/tests/phpunit/languages/LanguageSmaTest.php @@ -7,32 +7,36 @@ /** Tests for MediaWiki languages/classes/LanguageSma.php */ class LanguageSmaTest extends LanguageClassesTestCase { - - /** @dataProvider providerPluralThreeForms */ - function testPluralThreeForms( $result, $value ) { + /** @dataProvider providePlural */ + function testPlural( $result, $value ) { $forms = array( 'one', 'two', 'other' ); $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); } - function providerPluralThreeForms() { - return array ( + /** @dataProvider providePlural */ + function testGetPluralRuleType( $result, $value ) { + $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) ); + } + + public static function providePlural() { + return array( array( 'other', 0 ), - array( 'one', 1 ), - array( 'two', 2 ), + array( 'one', 1 ), + array( 'two', 2 ), array( 'other', 3 ), ); } - /** @dataProvider providerPlural */ - function testPlural( $result, $value ) { + /** @dataProvider providerPluralTwoForms */ + function testPluralTwoForms( $result, $value ) { $forms = array( 'one', 'other' ); $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) ); } - function providerPlural() { - return array ( + public static function providerPluralTwoForms() { + return array( array( 'other', 0 ), - array( 'one', 1 ), + array( 'one', 1 ), array( 'other', 2 ), array( 'other', 3 ), );