protected function assertEntity(string
$id, string
$language, string
$label, string
$description): void
{ $navigation_menu = Menu::
load($id);
$this->
assertSame($id,
$navigation_menu->
id());
$this->
assertSame($language,
$navigation_menu->
language()->
getId());
$this->
assertSame($label,
$navigation_menu->
label());
$this->
assertSame($description,
$navigation_menu->
getDescription());
} /**
* Tests the Drupal 7 menu to Drupal 8 migration.
*/
public function testMenu() { $this->
assertEntity('main', 'und', 'Main menu', 'The <em>Main</em> menu is used on many sites to show the major sections of the site, often in a top navigation bar.'
);
$this->
assertEntity('admin', 'und', 'Management', 'The <em>Management</em> menu contains links for administrative tasks.'
);
$this->
assertEntity('menu-test-menu', 'und', 'Test Menu', 'Test menu description.'
);
$this->
assertEntity('tools', 'und', 'Navigation', 'The <em>Navigation</em> menu contains links intended for site visitors. Links are added to the <em>Navigation</em> menu automatically by some modules.'
);