function UnavailableTest::testCreate in Payment 8.2
@covers ::create @covers ::__construct
File
- tests/
src/ Unit/ Plugin/ Payment/ Type/ UnavailableTest.php, line 61
Class
- UnavailableTest
- @coversDefaultClass \Drupal\payment\Plugin\Payment\Type\Unavailable
Namespace
Drupal\Tests\payment\Unit\Plugin\Payment\TypeCode
function testCreate() {
$container = $this
->createMock(ContainerInterface::class);
$map = array(
array(
'payment.event_dispatcher',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->eventDispatcher,
),
array(
'string_translation',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->stringTranslation,
),
);
$container
->expects($this
->any())
->method('get')
->willReturnMap($map);
$configuration = [];
$plugin_definition = [];
$plugin_id = $this
->randomMachineName();
$sut = Unavailable::create($container, $configuration, $plugin_id, $plugin_definition);
$this
->assertInstanceOf(Unavailable::class, $sut);
}