function ContextualLinkManagerTest::setUpMockDiscovery
Initializes the plugin discovery as a mock object.
4 calls to ContextualLinkManagerTest::setUpMockDiscovery()
- ContextualLinkManagerTest::testGetContextualLinkPluginsByGroup in core/
tests/ Drupal/ Tests/ Core/ Menu/ ContextualLinkManagerTest.php - Tests the getContextualLinkPluginsByGroup method.
- ContextualLinkManagerTest::testGetContextualLinksArrayByGroup in core/
tests/ Drupal/ Tests/ Core/ Menu/ ContextualLinkManagerTest.php - Tests the getContextualLinksArrayByGroup method.
- ContextualLinkManagerTest::testGetContextualLinksArrayByGroupAccessCheck in core/
tests/ Drupal/ Tests/ Core/ Menu/ ContextualLinkManagerTest.php - Tests the access checking of the getContextualLinksArrayByGroup method.
- ContextualLinkManagerTest::testPluginDefinitionAlter in core/
tests/ Drupal/ Tests/ Core/ Menu/ ContextualLinkManagerTest.php - Tests the plugins alter hook.
File
-
core/
tests/ Drupal/ Tests/ Core/ Menu/ ContextualLinkManagerTest.php, line 113
Class
Namespace
Drupal\Tests\Core\MenuCode
protected function setUpMockDiscovery() : void {
$this->pluginDiscovery = $this->createMock(DiscoveryInterface::class);
$reflection = new \ReflectionProperty(ContextualLinkManager::class, 'discovery');
$reflection->setValue($this->contextualLinkManager, $this->pluginDiscovery);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.