function BasicTest::testCreate in Payment 8.2
Same name in this branch
- 8.2 tests/src/Unit/Plugin/Payment/MethodConfiguration/BasicTest.php \Drupal\Tests\payment\Unit\Plugin\Payment\MethodConfiguration\BasicTest::testCreate()
- 8.2 tests/src/Unit/Plugin/Payment/Method/BasicTest.php \Drupal\Tests\payment\Unit\Plugin\Payment\Method\BasicTest::testCreate()
- 8.2 tests/src/Unit/Plugin/Payment/LineItem/BasicTest.php \Drupal\Tests\payment\Unit\Plugin\Payment\LineItem\BasicTest::testCreate()
@covers ::create @covers ::__construct
File
- tests/
src/ Unit/ Plugin/ Payment/ LineItem/ BasicTest.php, line 59
Class
- BasicTest
- @coversDefaultClass \Drupal\payment\Plugin\Payment\LineItem\Basic
Namespace
Drupal\Tests\payment\Unit\Plugin\Payment\LineItemCode
function testCreate() {
$container = $this
->createMock(ContainerInterface::class);
$map = array(
array(
'database',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->database,
),
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 = Basic::create($container, $configuration, $plugin_id, $plugin_definition);
$this
->assertInstanceOf(Basic::class, $sut);
}