Ejemplo n.º 1
0
 public function testAmount()
 {
     $amount = new Amount(100);
     $currency = Currency::EUR();
     $money = new Money($amount, $currency);
     $this->assertTrue($money->amount()->sameValueAs(new Amount(100)));
 }
Ejemplo n.º 2
0
 public function sameCurrencyOf(MoneyInterface $money)
 {
     return $this->currency->sameValueAs($money->currency());
 }