function PaymentMethodTest::testCreate in Payment 8.2
@covers ::create @covers ::__construct
File
- tests/
src/ Unit/ Plugin/ views/ filter/ PaymentMethodTest.php, line 59
Class
- PaymentMethodTest
- @coversDefaultClass \Drupal\payment\Plugin\views\filter\PaymentMethod
Namespace
Drupal\Tests\payment\Unit\Plugin\views\filterCode
function testCreate() {
$plugin_type_manager = $this
->prophesize(PluginTypeManagerInterface::class);
$plugin_type_manager
->getPluginType('payment_method')
->willReturn($this->paymentMethodPluginType);
$container = $this
->prophesize(ContainerInterface::class);
$container
->get('plugin.plugin_type_manager')
->willReturn($plugin_type_manager
->reveal());
$configuration = [];
$plugin_id = $this
->randomMachineName();
$plugin_definition = [];
$sut = PaymentMethod::create($container
->reveal(), $configuration, $plugin_id, $plugin_definition);
$this
->assertInstanceOf(PaymentMethod::class, $sut);
}