You are here

function PaymentStatusTest::testCreate in Payment 8.2

@covers ::create @covers ::__construct

File

tests/src/Unit/Plugin/views/filter/PaymentStatusTest.php, line 59

Class

PaymentStatusTest
@coversDefaultClass \Drupal\payment\Plugin\views\filter\PaymentStatus

Namespace

Drupal\Tests\payment\Unit\Plugin\views\filter

Code

function testCreate() {
  $plugin_type_manager = $this
    ->prophesize(PluginTypeManagerInterface::class);
  $plugin_type_manager
    ->getPluginType('payment_status')
    ->willReturn($this->paymentStatusPluginType);
  $container = $this
    ->prophesize(ContainerInterface::class);
  $container
    ->get('plugin.plugin_type_manager')
    ->willReturn($plugin_type_manager
    ->reveal());
  $configuration = [];
  $plugin_id = $this
    ->randomMachineName();
  $plugin_definition = [];
  $sut = PaymentStatus::create($container
    ->reveal(), $configuration, $plugin_id, $plugin_definition);
  $this
    ->assertInstanceOf(PaymentStatus::class, $sut);
}