1 menu.test MenuTestCase::toggleMenuLink($item)

Alternately disable and enable a menu link.

Parameters

$item: Menu link.

File

core/modules/menu/tests/menu.test, line 508
Tests for menu.module.

Class

MenuTestCase

Code

function toggleMenuLink($item) {
  $this->disableMenuLink($item);
  // Verify menu link is absent.
  $this->backdropGet('user');
  $this->assertNoText($item['link_title'], 'Menu link was not displayed');

  $this->enableMenuLink($item);
  // Verify menu link is displayed.
  $this->backdropGet('user');
  $this->assertText($item['link_title'], 'Menu link was displayed');
}