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