You are here

function ShortcutSetsTest::testShortcutSetDelete in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/shortcut/src/Tests/ShortcutSetsTest.php \Drupal\shortcut\Tests\ShortcutSetsTest::testShortcutSetDelete()

Tests deleting a shortcut set.

File

core/modules/shortcut/src/Tests/ShortcutSetsTest.php, line 188
Contains \Drupal\shortcut\Tests\ShortcutSetsTest.

Class

ShortcutSetsTest
Create, view, edit, delete, and change shortcut sets.

Namespace

Drupal\shortcut\Tests

Code

function testShortcutSetDelete() {
  $new_set = $this
    ->generateShortcutSet($this
    ->randomMachineName());
  $this
    ->drupalPostForm('admin/config/user-interface/shortcut/manage/' . $new_set
    ->id() . '/delete', array(), t('Delete'));
  $sets = ShortcutSet::loadMultiple();
  $this
    ->assertFalse(isset($sets[$new_set
    ->id()]), 'Successfully deleted a shortcut set.');
}