protected function ExchangeRateProviderDecoratorTest::assertExchangeRateEquals in Currency 8.3
Asserts that two exchange rates are equal.
Parameters
\Drupal\currency\ExchangeRateInterface $expected:
\Drupal\currency\ExchangeRateInterface $real:
2 calls to ExchangeRateProviderDecoratorTest::assertExchangeRateEquals()
- ExchangeRateProviderDecoratorTest::testLoad in tests/
src/ Unit/ Plugin/ Currency/ ExchangeRateProvider/ ExchangeRateProviderDecoratorTest.php - @covers ::load
- ExchangeRateProviderDecoratorTest::testLoadMultiple in tests/
src/ Unit/ Plugin/ Currency/ ExchangeRateProvider/ ExchangeRateProviderDecoratorTest.php - @covers ::loadMultiple
File
- tests/
src/ Unit/ Plugin/ Currency/ ExchangeRateProvider/ ExchangeRateProviderDecoratorTest.php, line 106
Class
- ExchangeRateProviderDecoratorTest
- @coversDefaultClass \Drupal\currency\Plugin\Currency\ExchangeRateProvider\ExchangeRateProviderDecorator
Namespace
Drupal\Tests\currency\Unit\Plugin\Currency\ExchangeRateProviderCode
protected function assertExchangeRateEquals(ExchangeRateInterface $expected, ExchangeRateInterface $real) {
$this
->assertSame($expected
->getSourceCurrencyCode(), $real
->getSourceCurrencyCode());
$this
->assertSame($expected
->getDestinationCurrencyCode(), $real
->getDestinationCurrencyCode());
$this
->assertSame($expected
->getRate(), $real
->getRate());
$this
->assertSame($expected
->getTimestamp(), $real
->getTimestamp());
$this
->assertSame($expected
->getExchangeRateProviderId(), $real
->getExchangeRateProviderId());
}