Exemple #1
0
 public function testCanCompareDifferentCurrenciesDifferentAmount()
 {
     $eur = new Money(1, new Currency('EUR'));
     $usd = new Money(2, $this->createUsd());
     $this->assertFalse($eur->equals($usd));
 }
 public function testSimpleSubtract()
 {
     // [14 EUR] - [12 EUR] == [2 EUR]
     $expected = new Money(2, 'EUR');
     $this->assertTrue($expected->equals($this->f14EUR->subtract($this->f12EUR)));
 }
 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()));
 }