Permalink
Browse files

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

  • Loading branch information...
markstory committed Dec 23, 2009
1 parent 850b959 commit e7a5143aa9dc26189d246f6ea2fdcee049dc2b38
Showing with 12 additions and 0 deletions.
  1. +12 −0 cake/tests/cases/libs/view/helpers/number.test.php
@@ -324,6 +324,18 @@ function testCurrencyOptions() {
$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);
}
/**

0 comments on commit e7a5143

Please sign in to comment.