You are here

function PaymentMethodConfigurationDeleteFormTest::testCreate in Payment 8.2

@covers ::create @covers ::__construct

File

tests/src/Unit/Entity/PaymentMethodConfiguration/PaymentMethodConfigurationDeleteFormTest.php, line 80

Class

PaymentMethodConfigurationDeleteFormTest
@coversDefaultClass \Drupal\payment\Entity\PaymentMethodConfiguration\PaymentMethodConfigurationDeleteForm

Namespace

Drupal\Tests\payment\Unit\Entity\PaymentMethodConfiguration

Code

function testCreate() {
  $container = $this
    ->createMock(ContainerInterface::class);
  $map = [
    [
      'payment.logger',
      ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
      $this->logger,
    ],
    [
      'string_translation',
      ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
      $this->stringTranslation,
    ],
  ];
  $container
    ->expects($this
    ->any())
    ->method('get')
    ->willReturnMap($map);
  $form = PaymentMethodConfigurationDeleteForm::create($container);
  $this
    ->assertInstanceOf(PaymentMethodConfigurationDeleteForm::class, $form);
}