protected static $modules =
['system', 'block', 'menu_link_content'
];
/**
* {@inheritdoc}
*/
protected function setUp(): void
{ parent::
setUp();
// Place the menu block, so menu trail gets built and cached. Showing the
// menu starting from the second level, so it is only shown when the active
// trail matches.
$this->
drupalPlaceBlock( 'system_menu_block:' .
$this->menu,
[ 'level' => 2,
] );
// Menu content, where the privileged user has access and the anonymous does
// not have access. This route will be visited by both users. The privileged
// user should see the menu with the menu content item created below.
$parent_menu_link_content = MenuLinkContent::
create([ 'title' => 'Admin overview',