function ShortcutSetsTest::testShortcutSetRename in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/shortcut/src/Tests/ShortcutSetsTest.php \Drupal\shortcut\Tests\ShortcutSetsTest::testShortcutSetRename()
Tests renaming a shortcut set.
File
- core/
modules/ shortcut/ src/ Tests/ ShortcutSetsTest.php, line 160 - Contains \Drupal\shortcut\Tests\ShortcutSetsTest.
Class
- ShortcutSetsTest
- Create, view, edit, delete, and change shortcut sets.
Namespace
Drupal\shortcut\TestsCode
function testShortcutSetRename() {
$set = $this->set;
$new_label = $this
->randomMachineName();
$this
->drupalGet('admin/config/user-interface/shortcut');
$this
->clickLink(t('Edit shortcut set'));
$this
->drupalPostForm(NULL, array(
'label' => $new_label,
), t('Save'));
$set = ShortcutSet::load($set
->id());
$this
->assertTrue($set
->label() == $new_label, 'Shortcut set has been successfully renamed.');
}