Skip to content

Commit

Permalink
Adding tests for after = false in currency(). Refs #34
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 23, 2009
1 parent 850b959 commit e7a5143
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cake/tests/cases/libs/view/helpers/number.test.php
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit e7a5143

Please sign in to comment.