protected function MenuUiTest::doMenuLinkFormDefaultsTest in Drupal 9
Same name and namespace in other branches
- 8 core/modules/menu_ui/tests/src/Functional/MenuUiTest.php \Drupal\Tests\menu_ui\Functional\MenuUiTest::doMenuLinkFormDefaultsTest()
Ensures that the proper default values are set when adding a menu link.
1 call to MenuUiTest::doMenuLinkFormDefaultsTest()
- MenuUiTest::doMenuTests in core/
modules/ menu_ui/ tests/ src/ Functional/ MenuUiTest.php - Tests menu functionality.
File
- core/
modules/ menu_ui/ tests/ src/ Functional/ MenuUiTest.php, line 519
Class
- MenuUiTest
- Add a custom menu, add menu links to the custom menu and Tools menu, check their data, and delete them using the UI.
Namespace
Drupal\Tests\menu_ui\FunctionalCode
protected function doMenuLinkFormDefaultsTest() {
$this
->drupalGet("admin/structure/menu/manage/tools/add");
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->fieldValueEquals('title[0][value]', '');
$this
->assertSession()
->fieldValueEquals('link[0][uri]', '');
$this
->assertSession()
->checkboxNotChecked('edit-expanded-value');
$this
->assertSession()
->checkboxChecked('edit-enabled-value');
$this
->assertSession()
->fieldValueEquals('description[0][value]', '');
$this
->assertSession()
->fieldValueEquals('weight[0][value]', 0);
}