function MenuLinkContentFormTest::testMenuLinkContentFormValidation
Same name in other branches
- 9 core/modules/menu_link_content/tests/src/Functional/MenuLinkContentFormTest.php \Drupal\Tests\menu_link_content\Functional\MenuLinkContentFormTest::testMenuLinkContentFormValidation()
- 8.9.x core/modules/menu_link_content/tests/src/Functional/MenuLinkContentFormTest.php \Drupal\Tests\menu_link_content\Functional\MenuLinkContentFormTest::testMenuLinkContentFormValidation()
- 11.x core/modules/menu_link_content/tests/src/Functional/MenuLinkContentFormTest.php \Drupal\Tests\menu_link_content\Functional\MenuLinkContentFormTest::testMenuLinkContentFormValidation()
Tests validation for the MenuLinkContentForm class.
File
-
core/
modules/ menu_link_content/ tests/ src/ Functional/ MenuLinkContentFormTest.php, line 106
Class
- MenuLinkContentFormTest
- Tests the menu link content UI.
Namespace
Drupal\Tests\menu_link_content\FunctionalCode
public function testMenuLinkContentFormValidation() : void {
$this->drupalGet('admin/structure/menu/manage/admin/add');
$this->submitForm([
'title[0][value]' => 'Test page',
'link[0][uri]' => '<test>',
], 'Save');
$this->assertSession()
->pageTextContains('Manually entered paths should start with one of the following characters: / ? #');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.