function PaymentLineItemsInputTest::testCreate in Payment 8.2
@covers ::create @covers ::__construct
File
- tests/
src/ Unit/ Element/ PaymentLineItemsInputTest.php, line 77
Class
- PaymentLineItemsInputTest
- @coversDefaultClass \Drupal\payment\Element\PaymentLineItemsInput
Namespace
Drupal\Tests\payment\Unit\ElementCode
function testCreate() {
$container = $this
->createMock(ContainerInterface::class);
$map = array(
array(
'plugin.manager.payment.line_item',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->paymentLineItemManager,
),
array(
'renderer',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->renderer,
),
array(
'string_translation',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->stringTranslation,
),
);
$container
->expects($this
->any())
->method('get')
->willReturnMap($map);
$configuration = [];
$plugin_id = $this
->randomMachineName();
$plugin_definition = [];
$sut = PaymentLineItemsInput::create($container, $configuration, $plugin_id, $plugin_definition);
$this
->assertInstanceOf(PaymentLineItemsInput::class, $sut);
}