diff --git a/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php b/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php index 9455724..fa27a3e 100644 --- a/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/ContextualLinkManagerTest.php @@ -91,6 +91,7 @@ protected function setUp() { $this->accessManager = $this->getMockBuilder('Drupal\Core\Access\AccessManager') ->disableOriginalConstructor() ->getMock(); + $this->account = $this->getMock('Drupal\Core\Session\AccountInterface'); $property = new \ReflectionProperty('Drupal\Core\Menu\ContextualLinkManager', 'controllerResolver'); $property->setAccessible(TRUE); @@ -104,6 +105,9 @@ protected function setUp() { $property->setAccessible(TRUE); $property->setValue($this->contextualLinkManager, $this->factory); + $property = new \ReflectionProperty('Drupal\Core\Menu\ContextualLinkManager', 'account'); + $property->setAccessible(TRUE); + $property->setValue($this->contextualLinkManager, $this->account); $property = new \ReflectionProperty('Drupal\Core\Menu\ContextualLinkManager', 'accessManager'); $property->setAccessible(TRUE); @@ -345,8 +349,8 @@ public function testGetContextualLinksArrayByGroupAccessCheck() { $this->accessManager->expects($this->any()) ->method('checkNamedRoute') ->will($this->returnValueMap(array( - array('test_route', array('key' => 'value'), NULL, TRUE), - array('test_route2', array('key' => 'value'), NULL, FALSE), + array('test_route', array('key' => 'value'), $this->account, NULL, TRUE), + array('test_route2', array('key' => 'value'), $this->account, NULL, FALSE), ))); // Set up mocking of the plugin factory.