Exemple #1
0
 /**
  * @dataProvider currencyCodeDataProvider
  * @param string $currencyCode
  */
 public function testCanRetrieveCurrency($currencyCode)
 {
     $money = new Money(1000, $currencyCode);
     $this->assertEquals($currencyCode, $money->getCurrency());
 }
Exemple #2
0
 /**
  * @param Money $money
  */
 private function assertCurrencyMatches(Money $money)
 {
     if ($this->currency !== $money->getCurrency()) {
         throw new DomainException('Currencies must match');
     }
 }