You are here

public function PdbBlockDeriverTest::testCreate in Decoupled Blocks 8

Tests the create method.

See also

::create()

File

tests/src/Unit/Plugin/Derivative/PdbBlockDeriverTest.php, line 58

Class

PdbBlockDeriverTest
@coversDefaultClass \Drupal\pdb\Plugin\Derivative\PdbBlockDeriver @group pdb

Namespace

Drupal\Tests\pdb\Unit\Plugin\Derivative

Code

public function testCreate() {
  $base_plugin_id = 'pdb';
  $container = $this
    ->prophesize(ContainerInterface::CLASS);
  $container
    ->get('pdb.component_discovery')
    ->willReturn($this->componentDiscovery);
  $instance = PdbBlockDeriver::create($container
    ->reveal(), $base_plugin_id);
  $this
    ->assertInstanceOf('Drupal\\pdb\\Plugin\\Derivative\\PdbBlockDeriver', $instance);
}