function DefaultPluginManagerTest::testCreateInstanceWithJustValidInterfaces

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest::testCreateInstanceWithJustValidInterfaces()
  2. 10 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest::testCreateInstanceWithJustValidInterfaces()
  3. 11.x 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 276

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));
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.