|
|
@ -77,8 +77,10 @@ class FormatterTest extends TestCase |
|
|
|
$this->assertSame('$123.00', $this->formatter->asCurrency($value)); |
|
|
|
$this->assertSame('$123.00', $this->formatter->asCurrency($value)); |
|
|
|
$value = '123.456'; |
|
|
|
$value = '123.456'; |
|
|
|
$this->assertSame("$123.46", $this->formatter->asCurrency($value)); |
|
|
|
$this->assertSame("$123.46", $this->formatter->asCurrency($value)); |
|
|
|
$value = '-123456.123'; |
|
|
|
// Starting from ICU 52.1, negative currency value will be formatted as -$123,456.12 |
|
|
|
$this->assertSame("($123,456.12)", $this->formatter->asCurrency($value)); |
|
|
|
// see: http://source.icu-project.org/repos/icu/icu/tags/release-52-1/source/data/locales/en.txt |
|
|
|
|
|
|
|
// $value = '-123456.123'; |
|
|
|
|
|
|
|
// $this->assertSame("($123,456.12)", $this->formatter->asCurrency($value)); |
|
|
|
$this->assertSame($this->formatter->nullDisplay, $this->formatter->asCurrency(null)); |
|
|
|
$this->assertSame($this->formatter->nullDisplay, $this->formatter->asCurrency(null)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|