Alternately disable and enable a menu link.
$item: Menu link.
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');
}