function ShortcutSetsTest::testShortcutSetRename

Tests renaming a shortcut set.

File

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

Class

ShortcutSetsTest
Defines shortcut set test cases.

Namespace

Drupal\shortcut\Tests

Code

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