$this->routeMatch->
expects($this->
any()) ->
method('getRouteName'
) ->
willReturn('menu_local_task_test_tasks_view'
);
$this->routeMatch->
expects($this->
any()) ->
method('getRawParameters'
) ->
willReturn(new InputBag());
$cacheability =
new CacheableMetadata();
$this->manager->
getTasksBuild('menu_local_task_test_tasks_view',
$cacheability);
// Ensure that all cacheability metadata is merged together.
$this->
assertEqualsCanonicalizing(['tag.example1', 'tag.example2'
],
$cacheability->
getCacheTags());
$this->
assertEqualsCanonicalizing(['context.example1', 'context.example2', 'route', 'user.permissions'
],
$cacheability->
getCacheContexts());
} protected function setupFactoryAndLocalTaskPlugins(array
$definitions,
$active_plugin_id) { $map =
[];
$access_manager_map =
[];
foreach ($definitions as $plugin_id =>
$info) { $info +=
['access' => AccessResult::
allowed()];
$mock =
$this->
prophesize(LocalTaskInterface::
class);