function DefaultPluginManagerTest::testProcessDefinition

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

Class

DefaultPluginManagerTest
Tests the DefaultPluginManager.

Namespace

Drupal\Tests\Core\Plugin

Code

public function testProcessDefinition($definition, $expected) : void {
    $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);
}

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