$request->attributes->
set(RouteObjectInterface::ROUTE_OBJECT,
$mock_route);
$request->attributes->
set('_raw_variables',
new InputBag([]));
$link_1 = MenuLinkMock::
create(['id' => 'baby_llama_link_1', 'route_name' => 'baby_llama', 'title' => 'Baby llama', 'parent' => 'mama_llama_link'
]);
$link_2 = MenuLinkMock::
create(['id' => 'baby_llama_link_2', 'route_name' => 'baby_llama', 'title' => 'Baby llama', 'parent' => 'papa_llama_link'
]);
// @see \Drupal\Core\Menu\MenuLinkManagerInterface::getParentIds()
$link_1_parent_ids =
['baby_llama_link_1', 'mama_llama_link', ''
];
$empty_active_trail =
[''
];
// No active link is returned when zero links match the current route.
$data[] =
[$request,
[], Random::
machineName(), NULL,
$empty_active_trail];
// The first (and only) matching link is returned when one link matches the
// current route.
$data[] =
[$request,
['baby_llama_link_1' =>
$link_1], Random::
machineName(),
$link_1,
$link_1_parent_ids];
// The first of multiple matching links is returned when multiple links
// match the current route, where "first" is determined by sorting by key.
$data[] =
[$request,
['baby_llama_link_1' =>
$link_1, 'baby_llama_link_2' =>
$link_2], Random::
machineName(),
$link_1,
$link_1_parent_ids];
// No active link is returned in case of a 403.
$request =
new Request();