You are here

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

Tests the create method.

See also

::create()

File

tests/src/Unit/Plugin/Block/VueBlockTest.php, line 84

Class

VueBlockTest
@coversDefaultClass \Drupal\pdb_vue\Plugin\Block\VueBlock @group pdb_vue

Namespace

Drupal\Tests\pdb_vue\Unit\Plugin\Block

Code

public function testCreate() {
  $configuration = [];
  $plugin_id = 'pdb_vue';
  $plugin_definition['provider'] = 'pdb_vue';
  $container = $this
    ->prophesize(ContainerInterface::CLASS);
  $container
    ->get('config.factory')
    ->willReturn($this->configFactory);
  $instance = VueBlock::create($container
    ->reveal(), $configuration, $plugin_id, $plugin_definition);
  $this
    ->assertInstanceOf('Drupal\\pdb_vue\\Plugin\\Block\\VueBlock', $instance);
}