You are here

function MenuTestCase::moveMenuLink in Drupal 7

Change the parent of a menu link using the menu module UI.

1 call to MenuTestCase::moveMenuLink()
MenuTestCase::doMenuTests in modules/menu/menu.test
Test menu functionality using navigation menu.

File

modules/menu/menu.test, line 410
Tests for menu.module.

Class

MenuTestCase
@file Tests for menu.module.

Code

function moveMenuLink($item, $plid, $menu_name) {
  $mlid = $item['mlid'];
  $edit = array(
    'parent' => $menu_name . ':' . $plid,
  );
  $this
    ->drupalPost("admin/structure/menu/item/{$mlid}/edit", $edit, t('Save'));
  $this
    ->assertResponse(200);
}