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