3 * Based on LanguagMlTest
10 class LanguageArTest
extends LanguageClassesTestCase
{
12 * @covers Language::formatNum
13 * @todo split into a test and a dataprovider
15 public function testFormatNum() {
16 $this->assertEquals( '١٬٢٣٤٬٥٦٧', $this->getLang()->formatNum( '1234567' ) );
17 $this->assertEquals( '-١٢٫٨٩', $this->getLang()->formatNum( -12.89 ) );
21 * Mostly to test the raw ascii feature.
22 * @dataProvider providerSprintfDate
23 * @covers Language::sprintfDate
25 public function testSprintfDate( $format, $date, $expected ) {
26 $this->assertEquals( $expected, $this->getLang()->sprintfDate( $format, $date ) );
29 public static function providerSprintfDate() {
55 * @dataProvider providePlural
56 * @covers Language::convertPlural
58 public function testPlural( $result, $value ) {
59 $forms = [ 'zero', 'one', 'two', 'few', 'many', 'other' ];
60 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
64 * @dataProvider providePlural
65 * @covers Language::getPluralRuleType
67 public function testGetPluralRuleType( $result, $value ) {
68 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
71 public static function providePlural() {