function ConfigurePaymentTypeTest::testCreate in Payment 8.2
@covers ::create @covers ::__construct
File
- tests/
src/ Unit/ Controller/ ConfigurePaymentTypeTest.php, line 64
Class
- ConfigurePaymentTypeTest
- @coversDefaultClass \Drupal\payment\Controller\ConfigurePaymentType
Namespace
Drupal\Tests\payment\Unit\ControllerCode
function testCreate() {
$container = $this
->createMock(ContainerInterface::class);
$map = [
[
'form_builder',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->formBuilder,
],
[
'plugin.manager.payment.type',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->paymentTypeManager,
],
[
'string_translation',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->stringTranslation,
],
];
$container
->expects($this
->any())
->method('get')
->willReturnMap($map);
$sut = ConfigurePaymentType::create($container);
$this
->assertInstanceOf(ConfigurePaymentType::class, $sut);
}