You are here

function CurrencyImportFormTest::testCreate in Currency 8.3

Same name in this branch
  1. 8.3 tests/src/Unit/Controller/CurrencyImportFormTest.php \Drupal\Tests\currency\Unit\Controller\CurrencyImportFormTest::testCreate()
  2. 8.3 tests/src/Unit/Form/CurrencyImportFormTest.php \Drupal\Tests\currency\Unit\Form\CurrencyImportFormTest::testCreate()

@covers ::create @covers ::__construct

File

tests/src/Unit/Controller/CurrencyImportFormTest.php, line 77

Class

CurrencyImportFormTest
@coversDefaultClass \Drupal\currency\Form\CurrencyImportForm

Namespace

Drupal\Tests\currency\Unit\Controller

Code

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);
}