diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTest.php index b0aa33e..9106f77 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTest.php @@ -89,6 +89,12 @@ protected function getLocalTaskManager($module_dirs, $route_name, $route_params) $property = new \ReflectionProperty('Drupal\Core\Menu\LocalTaskManager', 'moduleHandler'); $property->setAccessible(TRUE); $property->setValue($manager, $module_handler); + // Set all the modules as being existant. + $module_handler->expects($this->any()) + ->method('moduleExists') + ->will($this->returnCallback(function ($module) use ($module_dirs) { + return isset($module_dirs[$module]); + })); $pluginDiscovery = new YamlDiscovery('local_tasks', $module_dirs); $pluginDiscovery = new ContainerDerivativeDiscoveryDecorator($pluginDiscovery);