| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function testCreate() |
||
| 14 | { |
||
| 15 | $sourceCurrency = new Currency('EUR'); |
||
| 16 | $targetCurrency = new Currency('USD'); |
||
| 17 | $ratio = 1.12; |
||
| 18 | $factory = new NativeExchangeRateFactory(); |
||
| 19 | $exchangeRate = $factory->create($sourceCurrency, $targetCurrency, $ratio); |
||
| 20 | $this->assertInstanceOf(ExchangeRate::class, $exchangeRate); |
||
| 21 | $this->assertSame($sourceCurrency, $exchangeRate->getSourceCurrency()); |
||
| 22 | $this->assertSame($targetCurrency, $exchangeRate->getTargetCurrency()); |
||
| 23 | $this->assertSame($ratio, $exchangeRate->getRatio()); |
||
| 24 | } |
||
| 25 | } |
||
| 26 |