mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding tests for after = false in currency(). Refs #34
This commit is contained in:
parent
850b95900b
commit
e7a5143aa9
1 changed files with 12 additions and 0 deletions
|
@ -324,6 +324,18 @@ class NumberHelperTest extends CakeTestCase {
|
||||||
$result = $this->Number->currency($value, 'GBP', array('escape' => true));
|
$result = $this->Number->currency($value, 'GBP', array('escape' => true));
|
||||||
$expected = '£1,234,567.89';
|
$expected = '£1,234,567.89';
|
||||||
$this->assertEqual($expected, $result);
|
$this->assertEqual($expected, $result);
|
||||||
|
|
||||||
|
$result = $this->Number->currency('0.35', 'USD', array('after' => false));
|
||||||
|
$expected = '$0.35';
|
||||||
|
$this->assertEqual($expected, $result);
|
||||||
|
|
||||||
|
$result = $this->Number->currency('0.35', 'GBP', array('after' => false));
|
||||||
|
$expected = '£0.35';
|
||||||
|
$this->assertEqual($expected, $result);
|
||||||
|
|
||||||
|
$result = $this->Number->currency('0.35', 'GBP');
|
||||||
|
$expected = '35p';
|
||||||
|
$this->assertEqual($expected, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue