function PaymentMethodLabelTest::testCreate in Payment 8.2
@covers ::create @covers ::__construct
File
- tests/
src/ Unit/ Plugin/ views/ field/ PaymentMethodLabelTest.php, line 60
Class
- PaymentMethodLabelTest
- @coversDefaultClass \Drupal\payment\Plugin\views\field\PaymentMethodLabel
Namespace
Drupal\Tests\payment\Unit\Plugin\views\fieldCode
function testCreate() {
$container = $this
->createMock(ContainerInterface::class);
$map = array(
array(
'plugin.manager.payment.method',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->paymentMethodManager,
),
);
$container
->expects($this
->any())
->method('get')
->willReturnMap($map);
$configuration = [];
$plugin_id = $this
->randomMachineName();
$plugin_definition = [];
$sut = PaymentMethodLabel::create($container, $configuration, $plugin_id, $plugin_definition);
$this
->assertInstanceOf(PaymentMethodLabel::class, $sut);
}