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