Disable a menu link.
$item: Menu link.
function disableMenuLink($item) {
$mlid = $item['mlid'];
$edit['enabled'] = FALSE;
$this
->drupalPost("admin/structure/menu/item/{$mlid}/edit", $edit, t('Save'));
// Unlike most other modules, there is no confirmation message displayed.
// Verify in the database.
$this
->assertMenuLink($mlid, array(
'hidden' => 1,
));
}