public function DefaultPluginManagerTest::testCreateInstanceWithJustValidInterfaces in Drupal 9
Same name and namespace in other branches
- 8 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 275
Class
- DefaultPluginManagerTest
- Tests the DefaultPluginManager.
Namespace
Drupal\Tests\Core\PluginCode
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));
}
}