Exemple #1
0
 function it_can_subtract(Accountant $accountant, Money $money1, Money $money2, Money $money3)
 {
     $accountant->subtract($money1, $money2)->willReturn($money3);
     $this->subtract($money1, $money2)->shouldReturn($money3);
 }
Exemple #2
0
 /**
  * $money1 - $money2
  *
  * @param Money\Money $money1
  * @param Money\Money $money2
  * @return Money\Money
  */
 public function subtract(Money\Money $money1, Money\Money $money2)
 {
     return $this->accountant->subtract($money1, $money2);
 }