Commit 1de06faa by Qiang Xue

Fixes #1253

parent 0b43aa4f
...@@ -77,8 +77,10 @@ class FormatterTest extends TestCase ...@@ -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));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment