Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nWidart/MoneyFormatter
Browse files Browse the repository at this point in the history
* 'master' of github.com:nWidart/MoneyFormatter:
  Make the Euros tests pass!
  • Loading branch information
nWidart committed Mar 26, 2015
2 parents 29405f8 + ac162b3 commit 89b785e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/MoneyFormatterTest.php
Expand Up @@ -2,6 +2,7 @@

use Money\Currency;
use Money\Money;
use NumberFormatter;
use Nwidart\MoneyFormatter\MoneyFormatter;

class MoneyFormatterTest extends \PHPUnit_Framework_TestCase
Expand All @@ -20,10 +21,13 @@ public function should_format_as_american_dollars()
$this->assertEquals('$10.00', $formatter->format(new Money(1000, new Currency('USD'))));
}

/** @test */
public function should_format_as_european_euros()
{
$formatter = new MoneyFormatter('fr_BE');
$this->assertEquals('10,00 €', $formatter->format(new Money(1000, new Currency('EUR'))));
$moneyFormatter = new MoneyFormatter('fr_BE');
$formatter = new NumberFormatter('fr_BE', NumberFormatter::CURRENCY);

$this->assertEquals($formatter->formatCurrency('10.00', 'EUR'), $moneyFormatter->format(new Money(1000, new Currency('EUR'))));
}

/** @test */
Expand Down

0 comments on commit 89b785e

Please sign in to comment.