Adding tests for after = false in currency(). Refs #34

This commit is contained in:
Mark Story 2009-12-22 19:11:52 -05:00
parent 850b95900b
commit e7a5143aa9

View file

@ -324,6 +324,18 @@ class NumberHelperTest extends CakeTestCase {
$result = $this->Number->currency($value, 'GBP', array('escape' => true));
$expected = '£1,234,567.89';
$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);
}
/**