You are here

public function VueBlockDeriverTest::testCreate in Decoupled Blocks: Vue.js 8

Tests the create method.

See also

::create()

File

tests/src/Unit/Plugin/Derivative/VueBlockDeriverTest.php, line 82

Class

VueBlockDeriverTest
@coversDefaultClass \Drupal\pdb_vue\Plugin\Derivative\VueBlockDeriver @group pdb_vue

Namespace

Drupal\Tests\pdb_vue\Unit\Plugin\Derivative

Code

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