/** * @param BankAccount $source * @param BankAccount $target */ public function confirm(BankAccount $source, BankAccount $target) { $this->_idAccountNumberSource = $source->getIdAccount(); $this->_idAccountNumberTarget = $target->getIdAccount(); $this->_currencyCode = $this->_exchangeRate->getCurrencyCode(); $this->_course = $this->_exchangeRate->getCourse(); }
function it_is_ammount_operation_correct(ExchangeRate $exchangeRate) { $exchangeRate->getCourse()->willReturn(3.0); $this->beConstructedWith($exchangeRate->getWrappedObject(), 12); $this->getAmountSummary()->shouldReturn(36.0); }
/** * @Then /^wyswietla mi sie kurs$/ */ public function wyswietlaMiSieKurs() { $this->exchangeRate = new ExchangeRate(new Currency('EUR'), new Amount(3.5)); assert(3.5 == $this->exchangeRate->getCourse(), 'kurs nie jest zgodny z oczekiwanym'); }