function DevelGenerateCommandsTest::testDrushGenerateMenus
Same name in other branches
- 5.x devel_generate/tests/src/Functional/DevelGenerateCommandsTest.php \Drupal\Tests\devel_generate\Functional\DevelGenerateCommandsTest::testDrushGenerateMenus()
Tests generating menus.
File
-
devel_generate/
tests/ src/ Functional/ DevelGenerateCommandsTest.php, line 116
Class
- DevelGenerateCommandsTest
- Test class for the Devel Generate drush commands.
Namespace
Drupal\Tests\devel_generate\FunctionalCode
public function testDrushGenerateMenus() {
// Make sure menus, and with correct properties.
$this->drush('devel-generate-menus', [
1,
5,
], [
'kill' => NULL,
]);
$menus = Menu::loadMultiple();
foreach ($menus as $menu) {
if (strstr($menu->id(), 'devel-') !== FALSE) {
// We have a menu that we created.
break;
}
}
$link = MenuLinkContent::load(5);
$this->assertEquals($menu->id(), $link->getMenuName());
}