You are here

protected function MenuTest::doMenuLinkFormDefaultsTest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/menu_ui/src/Tests/MenuTest.php \Drupal\menu_ui\Tests\MenuTest::doMenuLinkFormDefaultsTest()

Ensures that the proper default values are set when adding a menu link

1 call to MenuTest::doMenuLinkFormDefaultsTest()
MenuTest::doMenuTests in core/modules/menu_ui/src/Tests/MenuTest.php
Tests menu functionality.

File

core/modules/menu_ui/src/Tests/MenuTest.php, line 479
Contains \Drupal\menu_ui\Tests\MenuTest.

Class

MenuTest
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\menu_ui\Tests

Code

protected function doMenuLinkFormDefaultsTest() {
  $this
    ->drupalGet("admin/structure/menu/manage/tools/add");
  $this
    ->assertResponse(200);
  $this
    ->assertFieldByName('title[0][value]', '');
  $this
    ->assertFieldByName('link[0][uri]', '');
  $this
    ->assertNoFieldChecked('edit-expanded-value');
  $this
    ->assertFieldChecked('edit-enabled-value');
  $this
    ->assertFieldByName('description[0][value]', '');
  $this
    ->assertFieldByName('weight[0][value]', 0);
}