adding tests for places that will leave a trailing 0 because of the way phps number_format() method works

Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
dogmatic69 2010-12-01 17:07:45 +00:00 committed by mark_story
parent c55a57927c
commit 96b30f0547

View file

@ -321,6 +321,14 @@ class NumberHelperTest extends CakeTestCase {
$expected = '&#163;1,234,568';
$this->assertEqual($expected, $result);
$result = $this->Number->currency('1234567.8912345', null, array('before' => 'GBP', 'places' => 3));
$expected = 'GBP1,234,567.891';
$this->assertEqual($expected, $result);
$result = $this->Number->currency('650.120001', null, array('before' => 'GBP', 'places' => 4));
$expected = 'GBP650.1200';
$this->assertEqual($expected, $result);
$result = $this->Number->currency($value, 'GBP', array('escape' => true));
$expected = '&amp;#163;1,234,567.89';
$this->assertEqual($expected, $result);