You are here

function ShortcutSetsTestCase::testShortcutSetDelete in Drupal 7

Tests deleting a shortcut set.

File

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

Class

ShortcutSetsTestCase
Defines shortcut set test cases.

Code

function testShortcutSetDelete() {
  $new_set = $this
    ->generateShortcutSet($this
    ->randomName(10));
  $this
    ->drupalPost('admin/config/user-interface/shortcut/' . $new_set->set_name . '/delete', array(), t('Delete'));
  $sets = shortcut_sets();
  $this
    ->assertFalse(isset($sets[$new_set->set_name]), 'Successfully deleted a shortcut set.');
}