You are here

function ShortcutLinksTestCase::testShortcutLinkDelete in Drupal 7

Tests deleting a shortcut link.

File

modules/shortcut/shortcut.test, line 194
Tests for shortcut.module.

Class

ShortcutLinksTestCase
Defines shortcut links test cases.

Code

function testShortcutLinkDelete() {
  $set = $this->set;
  $this
    ->drupalPost('admin/config/user-interface/shortcut/link/' . $set->links[0]['mlid'] . '/delete', array(), 'Delete');
  $saved_set = shortcut_set_load($set->set_name);
  $mlids = $this
    ->getShortcutInformation($saved_set, 'mlid');
  $this
    ->assertFalse(in_array($set->links[0]['mlid'], $mlids), 'Successfully deleted a shortcut.');
}