function MenuUiTest::testSystemMenuRename
Same name in other branches
- 8.9.x core/modules/menu_ui/tests/src/Functional/MenuUiTest.php \Drupal\Tests\menu_ui\Functional\MenuUiTest::testSystemMenuRename()
- 10 core/modules/menu_ui/tests/src/Functional/MenuUiTest.php \Drupal\Tests\menu_ui\Functional\MenuUiTest::testSystemMenuRename()
- 11.x core/modules/menu_ui/tests/src/Functional/MenuUiTest.php \Drupal\Tests\menu_ui\Functional\MenuUiTest::testSystemMenuRename()
Tests renaming the built-in menu.
File
-
core/
modules/ menu_ui/ tests/ src/ Functional/ MenuUiTest.php, line 633
Class
- MenuUiTest
- Tests the menu UI.
Namespace
Drupal\Tests\menu_ui\FunctionalCode
public function testSystemMenuRename() {
$this->drupalLogin($this->adminUser);
$edit = [
'label' => $this->randomMachineName(16),
];
$this->drupalGet('admin/structure/menu/manage/main');
$this->submitForm($edit, 'Save');
// Make sure menu shows up with new name in block addition.
$default_theme = $this->config('system.theme')
->get('default');
$this->drupalget('admin/structure/block/list/' . $default_theme);
$this->clickLink('Place block');
$this->assertSession()
->pageTextContains($edit['label']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.