public function ContextualLinkManagerTest::testProcessDefinitionWithoutGroup in Drupal 8
Tests processDefinition() by passing a plugin definition without a group.
See also
\Drupal\Core\Menu\ContextualLinkManager::processDefinition()
File
- core/
tests/ Drupal/ Tests/ Core/ Menu/ ContextualLinkManagerTest.php, line 225
Class
- ContextualLinkManagerTest
- @coversDefaultClass \Drupal\Core\Menu\ContextualLinkManager @group Menu
Namespace
Drupal\Tests\Core\MenuCode
public function testProcessDefinitionWithoutGroup() {
$definition = [
'class' => '\\Drupal\\Core\\Menu\\ContextualLinkDefault',
'route_name' => 'example',
'id' => 'test_plugin',
];
$this
->expectException(PluginException::class);
$this->contextualLinkManager
->processDefinition($definition, 'test_plugin');
}