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

Delete a menu link using the menu module UI.

Parameters

array $item Menu link.:

File

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

Class

MenuTestCase

Code

function deleteMenuLink($item) {
  $mlid = $item['mlid'];
  $title = $item['link_title'];

  // Delete menu link.
  $this->backdropPost("admin/structure/menu/item/$mlid/delete", array(), t('Confirm'));
  $this->assertResponse(200);
  $this->assertRaw(t('The menu link %title has been deleted.', array('%title' => $title)), 'Menu link was deleted');

  // Verify deletion.
  $this->backdropGet('user');
  $this->assertNoText($title, 'Menu link was deleted');
}