function PluginBasedExchangeRateProviderFormTest::testCreate in Currency 8.3
Same name in this branch
- 8.3 tests/src/Unit/Controller/PluginBasedExchangeRateProviderFormTest.php \Drupal\Tests\currency\Unit\Controller\PluginBasedExchangeRateProviderFormTest::testCreate()
- 8.3 tests/src/Unit/Form/PluginBasedExchangeRateProviderFormTest.php \Drupal\Tests\currency\Unit\Form\PluginBasedExchangeRateProviderFormTest::testCreate()
@covers ::create @covers ::__construct
File
- tests/
src/ Unit/ Controller/ PluginBasedExchangeRateProviderFormTest.php, line 77
Class
- PluginBasedExchangeRateProviderFormTest
- @coversDefaultClass \Drupal\currency\Form\PluginBasedExchangeRateProviderForm
Namespace
Drupal\Tests\currency\Unit\ControllerCode
function testCreate() {
$container = $this
->createMock(ContainerInterface::class);
$map = [
[
'plugin.manager.currency.exchange_rate_provider',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->currencyExchangeRateProviderManager,
],
[
'currency.exchange_rate_provider',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->exchangeRateProvider,
],
[
'string_translation',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->stringTranslation,
],
];
$container
->expects($this
->any())
->method('get')
->willReturnMap($map);
$sut = PluginBasedExchangeRateProviderForm::create($container);
$this
->assertInstanceOf(PluginBasedExchangeRateProviderForm::class, $sut);
}