You are here

public function DefaultPluginManagerTest::testCreateInstanceWithJustValidInterfaces in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest::testCreateInstanceWithJustValidInterfaces()

Tests plugins with the proper interface.

@covers ::createInstance

File

core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php, line 240
Contains \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest.

Class

DefaultPluginManagerTest
Tests the DefaultPluginManager.

Namespace

Drupal\Tests\Core\Plugin

Code

public function testCreateInstanceWithJustValidInterfaces() {
  $plugin_manager = new TestPluginManager($this->namespaces, $this->expectedDefinitions, NULL, NULL, '\\Drupal\\plugin_test\\Plugin\\plugin_test\\fruit\\FruitInterface');
  foreach ($this->expectedDefinitions as $plugin_id => $definition) {
    $this
      ->assertNotNull($plugin_manager
      ->createInstance($plugin_id));
  }
}