function ShortcutSetsTest::testShortcutSetRename
Same name in other branches
- 8.9.x core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php \Drupal\Tests\shortcut\Functional\ShortcutSetsTest::testShortcutSetRename()
- 10 core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php \Drupal\Tests\shortcut\Functional\ShortcutSetsTest::testShortcutSetRename()
- 11.x core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php \Drupal\Tests\shortcut\Functional\ShortcutSetsTest::testShortcutSetRename()
Tests renaming a shortcut set.
File
-
core/
modules/ shortcut/ tests/ src/ Functional/ ShortcutSetsTest.php, line 163
Class
- ShortcutSetsTest
- Create, view, edit, delete, and change shortcut sets.
Namespace
Drupal\Tests\shortcut\FunctionalCode
public function testShortcutSetRename() {
$set = $this->set;
$new_label = $this->randomMachineName();
$this->drupalGet('admin/config/user-interface/shortcut');
$this->clickLink('Edit shortcut set');
$this->submitForm([
'label' => $new_label,
], 'Save');
$set = ShortcutSet::load($set->id());
$this->assertSame($new_label, $set->label(), 'Shortcut set has been successfully renamed.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.