function ContextualLinkManagerTest::setUpMockCacheBackend
Reinitializes the cache backend as a mock object.
1 call to ContextualLinkManagerTest::setUpMockCacheBackend()
- ContextualLinkManagerTest::testGetContextualLinkPluginsByGroupWithCache in core/
tests/ Drupal/ Tests/ Core/ Menu/ ContextualLinkManagerTest.php - Tests the getContextualLinkPluginsByGroup method with a prefilled cache.
File
-
core/
tests/ Drupal/ Tests/ Core/ Menu/ ContextualLinkManagerTest.php, line 104
Class
Namespace
Drupal\Tests\Core\MenuCode
protected function setUpMockCacheBackend() : void {
$this->cacheBackend = $this->createMock(CacheBackendInterface::class);
$reflection = new \ReflectionProperty($this->contextualLinkManager, 'cacheBackend');
$reflection->setValue($this->contextualLinkManager, $this->cacheBackend);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.