diff --git a/core/modules/shortcut/src/Entity/ShortcutSet.php b/core/modules/shortcut/src/Entity/ShortcutSet.php index 52e3ecce029..fcbcac273ee 100644 --- a/core/modules/shortcut/src/Entity/ShortcutSet.php +++ b/core/modules/shortcut/src/Entity/ShortcutSet.php @@ -7,7 +7,7 @@ namespace Drupal\shortcut\Entity; -use Drupal\Core\Config\Entity\ConfigEntityBase; +use Drupal\Core\Config\Entity\ConfigEntityBundleBase; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\shortcut\ShortcutSetInterface; @@ -47,7 +47,7 @@ use Drupal\shortcut\ShortcutSetInterface; * } * ) */ -class ShortcutSet extends ConfigEntityBase implements ShortcutSetInterface { +class ShortcutSet extends ConfigEntityBundleBase implements ShortcutSetInterface { /** * The machine name for the configuration entity. diff --git a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php index 326fd724513..84f315b2e31 100644 --- a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php +++ b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php @@ -105,6 +105,21 @@ class ShortcutLinksTest extends ShortcutTestBase { ]; $this->drupalPostForm('admin/config/user-interface/shortcut/manage/' . $set->id() . '/add-link', $form_data, t('Save')); $this->assertLink($title, 0, 'Shortcut link found on the page.'); + + // Create a new shortcut set and add a link to it. + $this->drupalLogin($this->adminUser); + $edit = array( + 'label' => $this->randomMachineName(), + 'id' => strtolower($this->randomMachineName()), + ); + $this->drupalPostForm('admin/config/user-interface/shortcut/add-set', $edit, t('Save')); + $title = $this->randomMachineName(); + $form_data = [ + 'title[0][value]' => $title, + 'link[0][uri]' => '/admin', + ]; + $this->drupalPostForm('admin/config/user-interface/shortcut/manage/' . $edit['id'] . '/add-link', $form_data, t('Save')); + $this->assertResponse(200); } /**