13 $this->assertEquals( $formatted, $this->
getLang()->formatNum( $num ) );
18 [
'1234567',
'١٬٢٣٤٬٥٦٧' ],
29 if (
$input === $expected ) {
30 throw new Exception(
'Expected output must differ.' );
34 $this->assertSame( $expected, $this->
getLang()->normalize(
$input ),
'ar-normalised form' );
37 $this->assertSame(
$input, $this->
getLang()->normalize(
$input ),
'regular normalised form' );
55 $this->assertEquals( $expected, $this->
getLang()->sprintfDate( $format, $date ) );
88 $forms = [
'zero',
'one',
'two',
'few',
'many',
'other' ];
89 $this->assertEquals( $result, $this->
getLang()->convertPlural(
$value, $forms ) );
97 $this->assertEquals( $result, $this->
getLang()->getPluralRuleType(
$value ) );
static provideNormalize()
static provideSprintfDate()
testNormalize( $input, $expected)
LanguageAr::normalize Language::normalize provideNormalize.
testFormatNum( $num, $formatted)
Language::formatNum provideFormatNum.
testPlural( $result, $value)
providePlural Language::convertPlural
static provideFormatNum()
testSprintfDate( $format, $date, $expected)
Mostly to test the raw ascii feature.
testGetPluralRuleType( $result, $value)
providePlural Language::getPluralRuleType
Helping class to run tests using a clean language instance.
if(is_array($mode)) switch( $mode) $input