public function testIdentity()
 {
     $bank = new Bank();
     $this->assertEquals(1, $bank->rate('USD', 'USD'));
 }
Example #2
0
 public function reduce(Bank $bank, $to)
 {
     $rate = $bank->rate($this->currency, $to);
     return new Money($this->amount / $rate, $to);
 }