You are here

function PermissionsTest::testCreate in Payment 8.2

@covers ::create @covers ::__construct

File

tests/src/Unit/PermissionsTest.php, line 53

Class

PermissionsTest
@coversDefaultClass \Drupal\payment\Permissions

Namespace

Drupal\Tests\payment\Unit

Code

function testCreate() {
  $container = $this
    ->createMock(ContainerInterface::class);
  $map = array(
    array(
      'plugin.manager.payment.method_configuration',
      ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
      $this->paymentMethodConfigurationManager,
    ),
    array(
      'string_translation',
      ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
      $this->stringTranslation,
    ),
  );
  $container
    ->expects($this
    ->any())
    ->method('get')
    ->willReturnMap($map);
  $sut = Permissions::create($container);
  $this
    ->assertInstanceOf(Permissions::class, $sut);
}