function ShortcutSetsTest::testShortcutSetAdd

Tests creating a shortcut set.

File

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

Class

ShortcutSetsTest
Defines shortcut set test cases.

Namespace

Drupal\shortcut\Tests

Code

function testShortcutSetAdd() {
  $new_set = $this
    ->generateShortcutSet($this
    ->randomName(10));
  $sets = shortcut_sets();
  $this
    ->assertTrue(isset($sets[$new_set->set_name]), 'Successfully created a shortcut set.');
  $this
    ->drupalGet('user/' . $this->admin_user->uid . '/shortcuts');
  $this
    ->assertText($new_set->title, 'Generated shortcut set was listed as a choice on the user account page.');
}