function ShortcutSetsTest::testShortcutSetDelete

Tests deleting a shortcut set.

File

drupal/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutSetsTest.php, line 141
Definition of Drupal\shortcut\Tests\ShortcutSetsTest.

Class

ShortcutSetsTest
Defines shortcut set test cases.

Namespace

Drupal\shortcut\Tests

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.');
}