mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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:
parent
c55a57927c
commit
96b30f0547
1 changed files with 8 additions and 0 deletions
|
@ -321,6 +321,14 @@ class NumberHelperTest extends CakeTestCase {
|
|||
$expected = '£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 = '&#163;1,234,567.89';
|
||||
$this->assertEqual($expected, $result);
|
||||
|
|
Loading…
Reference in a new issue