Browse Source

Fixes #1253

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
1de06faa3b
  1. 6
      tests/unit/framework/i18n/FormatterTest.php

6
tests/unit/framework/i18n/FormatterTest.php

@ -77,8 +77,10 @@ class FormatterTest extends TestCase
$this->assertSame('$123.00', $this->formatter->asCurrency($value));
$value = '123.456';
$this->assertSame("$123.46", $this->formatter->asCurrency($value));
$value = '-123456.123';
$this->assertSame("($123,456.12)", $this->formatter->asCurrency($value));
// Starting from ICU 52.1, negative currency value will be formatted as -$123,456.12
// 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));
}

Loading…
Cancel
Save