3 * Based on LanguagMlTest
7 /** Tests for MediaWiki languages/LanguageAr.php */
8 class LanguageArTest
extends LanguageClassesTestCase
{
10 * @covers Language::formatNum
11 * @todo split into a test and a dataprovider
13 public function testFormatNum() {
14 $this->assertEquals( '١٬٢٣٤٬٥٦٧', $this->getLang()->formatNum( '1234567' ) );
15 $this->assertEquals( '-١٢٫٨٩', $this->getLang()->formatNum( -12.89 ) );
19 * Mostly to test the raw ascii feature.
20 * @dataProvider providerSprintfDate
21 * @covers Language::sprintfDate
23 public function testSprintfDate( $format, $date, $expected ) {
24 $this->assertEquals( $expected, $this->getLang()->sprintfDate( $format, $date ) );
27 public static function providerSprintfDate() {
53 * @dataProvider providePlural
54 * @covers Language::convertPlural
56 public function testPlural( $result, $value ) {
57 $forms = [ 'zero', 'one', 'two', 'few', 'many', 'other' ];
58 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
62 * @dataProvider providePlural
63 * @covers Language::getPluralRuleType
65 public function testGetPluralRuleType( $result, $value ) {
66 $this->assertEquals( $result, $this->getLang()->getPluralRuleType( $value ) );
69 public static function providePlural() {