1 menu.test MenuTestCase::resetMenuLink($item, $old_title)

Reset a standard menu link using the menu module UI.

Parameters

array $item Menu link.:

string $old_title Original title for menu link.:

File

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

Class

MenuTestCase

Code

function resetMenuLink($item, $old_title) {
  $mlid = $item['mlid'];
  $title = $item['link_title'];

  // Reset menu link.
  $this->backdropPost("admin/structure/menu/item/$mlid/reset", array(), t('Reset'));
  $this->assertResponse(200);
  $this->assertRaw(t('The menu link was reset to its default settings.'), 'Menu link was reset');

  // Verify menu link.
  $this->backdropGet('');
  $this->assertNoText($title, 'Menu link was reset');
  $this->assertText($old_title, 'Menu link was reset');
}