Skip to content

Commit

Permalink
Add tests for Number::currency() for peculiar patterns.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Aug 3, 2014
1 parent fbb974e commit 5525658
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/TestCase/Utility/NumberTest.php
Expand Up @@ -170,6 +170,15 @@ public function testCurrency() {
$expected = 'US$100,100,100.00';
$this->assertEquals($expected, $result);

$result = $this->Number->currency($value, 'INR', ['locale' => 'en_IN']);
$expected = '₹ 10,01,00,100.00';
$this->assertEquals($expected, $result);

$options = ['locale' => 'en_IN', 'pattern' => "Rs'.' #,##,###"];
$result = $this->Number->currency($value, 'INR', $options);
$expected = 'Rs. 10,01,00,100';
$this->assertEquals($expected, $result);

$result = $this->Number->currency($value, 'GBP');
$expected = '£100,100,100.00';
$this->assertEquals($expected, $result);
Expand Down

0 comments on commit 5525658

Please sign in to comment.