public function assertMenusExist(TableNode $expected) {
    $menu_info = [];
    /** @var \Drupal\system\Entity\Menu $menu */
    $menus = $this->entityTypeManager()
      ->getStorage('menu')
      ->loadMultiple();
    foreach ($menus as $id => $menu) {
      $menu_info[] = [$menu->label(), $id, $menu->getDescription()];
    }
    $actual = new TableNode($menu_info);

    (new TableEqualityAssertion($expected, $actual))
      ->expectHeader(['Name', 'Machine name', 'Description'])
      ->ignoreRowOrder()
      ->setMissingRowsLabel(self::missingRowsLabelFor('menus'))
      ->setUnexpectedRowsLabel(self::unexpectedRowsLabelFor('menus'))
      ->assert();
  }
public function assertMenusExist(TableNode $expected) {
    $menu_info = [];
    /** @var \Drupal\system\Entity\Menu $menu */
    $menus = $this->entityTypeManager()
      ->getStorage('menu')
      ->loadMultiple();
    foreach ($menus as $id => $menu) {
      $menu_info[] = [$menu->label(), $id, $menu->getDescription()];
    }
    $actual = new TableNode($menu_info);

    (new TableEqualityAssertion($expected, $actual))
      ->expectHeader(['Name', 'Machine name', 'Description'])
      ->ignoreRowOrder()
      ->setMissingRowsLabel(self::missingRowsLabelFor('menus'))
      ->setUnexpectedRowsLabel(self::unexpectedRowsLabelFor('menus'))
      ->assert();
  }
public function assertMenusExist ( TableNode $ expected ) { $ menu_info = [ ] ; /** @var \Drupal\system\Entity\Menu $menu */ $ menus = $ this -> entityTypeManager ( ) -> getStorage ( 'menu' ) -> loadMultiple ( ) ; foreach ( $ menus as $ id => $ menu ) { $ menu_info [ ] = [ $ menu -> label ( ) , $ id , $ menu -> getDescription ( ) ] ; } $ actual = new TableNode ( $ menu_info ) ; ( new TableEqualityAssertion ( $ expected , $ actual ) ) -> expectHeader ( [ 'Name' , 'Machine name' , 'Description' ] ) -> ignoreRowOrder ( ) -> setMissingRowsLabel ( self :: missingRowsLabelFor ( 'menus' ) ) -> setUnexpectedRowsLabel ( self :: unexpectedRowsLabelFor ( 'menus' ) ) -> assert ( ) ; }
Asserts the configuration of menus.

@Then exactly the following menus should exist

@throws \Exception
Asserts the configuration of menus .