1 menu.test | MenuTestCase::modifyMenuLink(&$item) |
Modify a menu link using the menu module UI.
Parameters
array $item Menu link passed by reference.:
File
- core/
modules/ menu/ tests/ menu.test, line 444 - Tests for menu.module.
Class
Code
function modifyMenuLink(&$item) {
$item['link_title'] = $this->randomName(16);
$mlid = $item['mlid'];
$title = $item['link_title'];
// Edit menu link.
$edit = array();
$edit['link_title'] = $title;
$this->backdropPost("admin/structure/menu/item/$mlid/edit", $edit, t('Save'));
$this->assertResponse(200);
// Unlike most other modules, there is no confirmation message displayed.
// Verify menu link.
$this->backdropGet('admin/structure/menu/manage/' . $item['menu_name']);
$this->assertText($title, 'Menu link was edited');
}