function MenuTestCase::toggleMenuLink in Drupal 7
Alternately disable and enable a menu link.
Parameters
$item: Menu link.
1 call to MenuTestCase::toggleMenuLink()
- MenuTestCase::doMenuTests in modules/
menu/ menu.test - Test menu functionality using navigation menu.
File
- modules/
menu/ menu.test, line 489 - Tests for menu.module.
Class
- MenuTestCase
- @file Tests for menu.module.
Code
function toggleMenuLink($item) {
$this
->disableMenuLink($item);
// Verify menu link is absent.
$this
->drupalGet('');
$this
->assertNoText($item['link_title'], 'Menu link was not displayed');
$this
->enableMenuLink($item);
// Verify menu link is displayed.
$this
->drupalGet('');
$this
->assertText($item['link_title'], 'Menu link was displayed');
}