'label' => 'Llama',
'description' => 'Description text',
]);
$menu->
save();
/** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */
$menu_link_manager = \Drupal::
service('plugin.manager.menu.link'
);
// Move a link into the new menu.
$menu_link =
$menu_link_manager->
updateDefinition('test_page_test.test_page',
['menu_name' => 'llama', 'parent' => ''
]);
$block =
$this->
drupalPlaceBlock('system_menu_block:llama',
['label' => 'Llama', 'provider' => 'system', 'region' => 'footer'
]);
// Prime the page cache.
$this->
verifyPageCache($url, 'MISS'
);
// Verify a cache hit, but also the presence of the correct cache tags.
$expected_tags =
[ 'http_response',
'rendered',
'block_view',
'config:block_list',
'config:block.block.' .
$block->
id(),
'config:system.menu.llama',
// The cache contexts associated with the (in)accessible menu links are
// bubbled.