You are here

function MenuTestCase::enableMenuLink in Drupal 7

Enable a menu link.

Parameters

$item: Menu link.

1 call to MenuTestCase::enableMenuLink()
MenuTestCase::toggleMenuLink in modules/menu/menu.test
Alternately disable and enable a menu link.

File

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

Class

MenuTestCase
@file Tests for menu.module.

Code

function enableMenuLink($item) {
  $mlid = $item['mlid'];
  $edit['enabled'] = TRUE;
  $this
    ->drupalPost("admin/structure/menu/item/{$mlid}/edit", $edit, t('Save'));

  // Verify in the database.
  $this
    ->assertMenuLink($mlid, array(
    'hidden' => 0,
  ));
}