Ejemplo n.º 1
0
 public function testCanCompareDifferentCurrenciesDifferentAmount()
 {
     $eur = new Money(1, new Currency('EUR'));
     $usd = new Money(2, $this->createUsd());
     $this->assertFalse($eur->equals($usd));
 }
Ejemplo n.º 2
0
 public function testSimpleSubtract()
 {
     // [14 EUR] - [12 EUR] == [2 EUR]
     $expected = new Money(2, 'EUR');
     $this->assertTrue($expected->equals($this->f14EUR->subtract($this->f12EUR)));
 }
Ejemplo n.º 3
0
 public function testCurrentPriceCanBeRetrieved()
 {
     $auction = $this->createAuction($this->title, $this->description, $this->startPrice, $this->owner, $this->startTime, $this->endTime);
     $this->assertTrue($this->startPrice->equals($auction->currentPrice()));
 }