public function ShortcutSetsTest::testShortcutSetRename in Drupal 9
Same name and namespace in other branches
- 8 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()
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.');
}