function MenuTestCase::disableMenuLink

7.x menu.test MenuTestCase::disableMenuLink($item)

Disable a menu link.

Parameters

$item: Menu link.

2 calls to MenuTestCase::disableMenuLink()
MenuTestCase::doMenuTests in drupal-7.x/modules/menu/menu.test
Test menu functionality using navigation menu.
MenuTestCase::toggleMenuLink in drupal-7.x/modules/menu/menu.test
Alternately disable and enable a menu link.

File

drupal-7.x/modules/menu/menu.test, line 467
Tests for menu.module.

Class

MenuTestCase

Code

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));
}