$menu_tree = \Drupal::menuTree();
$renderer = \Drupal::service('renderer');
-
$default_menu_cacheability = (new BubbleableMetadata())
->setCacheMaxAge(Cache::PERMANENT)
->setCacheTags(['config:system.menu.tools'])
$menu_link_content = MenuLinkContent::create([
'link' => ['uri' => $expectation['uri']],
'menu_name' => 'tools',
+ 'title' => 'Link test',
]);
$menu_link_content->save();
$tree = $menu_tree->load('tools', new MenuTreeParameters());
$menu_link_content = MenuLinkContent::create([
'link' => ['uri' => $expectation['uri']],
'menu_name' => 'tools',
+ 'title' => 'Link test',
]);
$menu_link_content->save();
$expected_cacheability = $expected_cacheability->merge($expectation['cacheability']);