3 namespace Drupal\Tests\rest\Functional\EntityResource\ShortcutSet;
5 use Drupal\shortcut\Entity\ShortcutSet;
6 use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
9 * ResourceTestBase for ShortcutSet entity.
11 abstract class ShortcutSetResourceTestBase extends EntityResourceTestBase {
16 public static $modules = ['shortcut'];
21 protected static $entityTypeId = 'shortcut_set';
26 protected static $patchProtectedFieldNames = [];
29 * The ShortcutSet entity.
31 * @var \Drupal\shortcut\ShortcutSetInterface
38 protected function setUpAuthorization($method) {
41 $this->grantPermissionsToTestedRole(['access shortcuts']);
46 $this->grantPermissionsToTestedRole(['access shortcuts', 'customize shortcut links']);
50 $this->grantPermissionsToTestedRole(['administer shortcuts']);
58 protected function createEntity() {
59 $set = ShortcutSet::create([
61 'label' => 'Llama Set',
70 protected function getExpectedNormalizedEntity() {
73 'uuid' => $this->entity->uuid(),
74 'label' => 'Llama Set',
84 protected function getNormalizedPostEntity() {
85 // @todo Update in https://www.drupal.org/node/2300677.