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