You are here

public function PluginDiscoveryTest::testInstanceCreation in Block Style Plugins 8

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/PluginDiscoveryTest.php \Drupal\Tests\block_style_plugins\Kernel\PluginDiscoveryTest::testInstanceCreation()

Make sure that plugins are discovered.

File

tests/src/Kernel/PluginDiscoveryTest.php, line 100

Class

PluginDiscoveryTest
Test of the Block Style Plugins discovery integration.

Namespace

Drupal\Tests\block_style_plugins\Kernel

Code

public function testInstanceCreation() {
  $plugin_manager = $this->container
    ->get('plugin.manager.block_style.processor');
  $style_plugin = $plugin_manager
    ->createInstance('simple_class');
  $this
    ->assertInstanceOf('Drupal\\block_style_plugins\\Plugin\\BlockStyleInterface', $style_plugin);
}