public function DefaultPluginManagerTest::testProcessDefinition in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest::testProcessDefinition()
@covers ::processDefinition @dataProvider providerTestProcessDefinition
File
- core/
tests/ Drupal/ Tests/ Core/ Plugin/ DefaultPluginManagerTest.php, line 405
Class
- DefaultPluginManagerTest
- Tests the DefaultPluginManager.
Namespace
Drupal\Tests\Core\PluginCode
public function testProcessDefinition($definition, $expected) {
$module_handler = $this
->prophesize(ModuleHandlerInterface::class);
$plugin_manager = new TestPluginManagerWithDefaults($this->namespaces, $this->expectedDefinitions, $module_handler
->reveal(), NULL);
$plugin_manager
->processDefinition($definition, 'the_plugin_id');
$this
->assertEquals($expected, $definition);
}