/** * @covers ::load */ public function testLoad() { $source_currency_code = 'EUR'; $destination_currency_code = 'NLG'; $exchange_rate = '2.20371'; $this->assertSame($exchange_rate, $this->sut->load($source_currency_code, $destination_currency_code)->getRate()); }
/** * @covers ::load */ public function testLoad() { $source_currency_code = $this->randomMachineName(); $destination_currency_code = $this->randomMachineName(); $rate = mt_rand(); $exchange_rate = new ExchangeRate($source_currency_code, $destination_currency_code, $rate, $this->pluginId); $this->exchangeRateProvider->expects($this->once())->method('load')->with($source_currency_code, $destination_currency_code)->willReturn($exchange_rate); $this->assertExchangeRateEquals($exchange_rate, $this->sut->load($source_currency_code, $destination_currency_code)); }