function CurrencyExchangeTest::testCreate in Currency 8.3
@covers ::create @covers ::__construct
File
- tests/
src/ Unit/ Plugin/ Filter/ CurrencyExchangeTest.php, line 101
Class
- CurrencyExchangeTest
- @coversDefaultClass \Drupal\currency\Plugin\Filter\CurrencyExchange
Namespace
Drupal\Tests\currency\Unit\Plugin\FilterCode
function testCreate() {
$container = $this
->createMock(ContainerInterface::class);
$map = [
[
'currency.input',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->input,
],
[
'string_translation',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->stringTranslation,
],
[
'currency.exchange_rate_provider',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->exchangeRateProvider,
],
];
$container
->expects($this
->any())
->method('get')
->willReturnMap($map);
$sut = CurrencyExchange::create($container, [], '', $this->pluginDefinition);
$this
->assertInstanceOf(CurrencyExchange::class, $sut);
}