3 * Based on LanguagMlTest
7 /** Tests for MediaWiki languages/LanguageAr.php */
8 class LanguageArTest
extends LanguageClassesTestCase
{
10 function testFormatNum() {
11 $this->assertEquals( '١٬٢٣٤٬٥٦٧', $this->getLang()->formatNum( '1234567' ) );
12 $this->assertEquals( '-١٢٫٨٩', $this->getLang()->formatNum( -12.89 ) );
16 * Mostly to test the raw ascii feature.
17 * @dataProvider providerSprintfDate
19 function testSprintfDate( $format, $date, $expected ) {
20 $this->assertEquals( $expected, $this->getLang()->sprintfDate( $format, $date ) );
23 function providerSprintfDate() {
48 /** @dataProvider providePlural */
49 function testPlural( $result, $value ) {
50 $forms = array( 'zero', 'one', 'two', 'few', 'many', 'other' );
51 $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
54 function providePlural() {
65 array( 'many', 9999 ),
66 array( 'other', 100 ),
67 array( 'other', 102 ),
68 array( 'other', 1000 ),
69 array( 'other', 1.7 ),