You are here

function DuplicatePaymentMethodConfigurationTest::testCreate in Payment 8.2

@covers ::create @covers ::__construct

File

tests/src/Unit/Controller/DuplicatePaymentMethodConfigurationTest.php, line 55

Class

DuplicatePaymentMethodConfigurationTest
@coversDefaultClass \Drupal\payment\Controller\DuplicatePaymentMethodConfiguration

Namespace

Drupal\Tests\payment\Unit\Controller

Code

function testCreate() {
  $container = $this
    ->createMock(ContainerInterface::class);
  $map = [
    [
      'entity.form_builder',
      ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
      $this->entityFormBuilder,
    ],
    [
      'string_translation',
      ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
      $this->stringTranslation,
    ],
  ];
  $container
    ->expects($this
    ->any())
    ->method('get')
    ->willReturnMap($map);
  $sut = DuplicatePaymentMethodConfiguration::create($container);
  $this
    ->assertInstanceOf(DuplicatePaymentMethodConfiguration::class, $sut);
}