function ContextualLinkManagerTest::testProcessDefinitionWithoutRoute
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php \Drupal\Tests\Core\Menu\ContextualLinkManagerTest::testProcessDefinitionWithoutRoute()
- 8.9.x core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php \Drupal\Tests\Core\Menu\ContextualLinkManagerTest::testProcessDefinitionWithoutRoute()
- 11.x core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php \Drupal\Tests\Core\Menu\ContextualLinkManagerTest::testProcessDefinitionWithoutRoute()
Tests processDefinition() by passing a plugin definition without a route.
See also
\Drupal\Core\Menu\ContextualLinkManager::processDefinition()
File
-
core/
tests/ Drupal/ Tests/ Core/ Menu/ ContextualLinkManagerTest.php, line 177
Class
- ContextualLinkManagerTest
- @coversDefaultClass \Drupal\Core\Menu\ContextualLinkManager @group Menu
Namespace
Drupal\Tests\Core\MenuCode
public function testProcessDefinitionWithoutRoute() : void {
$definition = [
'class' => '\\Drupal\\Core\\Menu\\ContextualLinkDefault',
'group' => 'example',
'id' => 'test_plugin',
];
$this->expectException(PluginException::class);
$this->contextualLinkManager
->processDefinition($definition, 'test_plugin');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.