public function DefaultFactoryTest::testGetPluginClassWithInterfaceWithArrayPluginDefinition in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Component/Plugin/DefaultFactoryTest.php \Drupal\Tests\Component\Plugin\DefaultFactoryTest::testGetPluginClassWithInterfaceWithArrayPluginDefinition()
- 10 core/tests/Drupal/Tests/Component/Plugin/DefaultFactoryTest.php \Drupal\Tests\Component\Plugin\DefaultFactoryTest::testGetPluginClassWithInterfaceWithArrayPluginDefinition()
Tests getPluginClass() with a required interface.
@covers ::getPluginClass
File
- core/
tests/ Drupal/ Tests/ Component/ Plugin/ DefaultFactoryTest.php, line 102
Class
- DefaultFactoryTest
- @coversDefaultClass \Drupal\Component\Plugin\Factory\DefaultFactory @group Plugin
Namespace
Drupal\Tests\Component\PluginCode
public function testGetPluginClassWithInterfaceWithArrayPluginDefinition() {
$plugin_class = Corn::class;
$class = DefaultFactory::getPluginClass('corn', [
'class' => $plugin_class,
], VegetableInterface::class);
$this
->assertEquals($plugin_class, $class);
}