function ShortcutSetsTest::testShortcutSetRename

Tests renaming a shortcut set.

File

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

Class

ShortcutSetsTest
Defines shortcut set test cases.

Namespace

Drupal\shortcut\Tests

Code

function testShortcutSetRename() {
  $set = $this->set;
  $new_title = $this
    ->randomName(10);
  $this
    ->drupalPost('admin/config/user-interface/shortcut/' . $set->set_name . '/edit', array(
    'title' => $new_title,
  ), t('Save'));
  $set = shortcut_set_load($set->set_name);
  $this
    ->assertTrue($set->title == $new_title, 'Shortcut set has been successfully renamed.');
}