You are here

function EditPaymentMethodConfigurationTest::testCreate in Payment 8.2

@covers ::create @covers ::__construct

File

tests/src/Unit/Controller/EditPaymentMethodConfigurationTest.php, line 47

Class

EditPaymentMethodConfigurationTest
@coversDefaultClass \Drupal\payment\Controller\EditPaymentMethodConfiguration

Namespace

Drupal\Tests\payment\Unit\Controller

Code

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