function ShortcutSetResourceTestBase::createEntity

Same name in other branches
  1. 9 core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutSetResourceTestBase::createEntity()
  2. 8.9.x core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutSetResourceTestBase::createEntity()
  3. 11.x core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutSetResourceTestBase::createEntity()

Overrides EntityResourceTestBase::createEntity

File

core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php, line 60

Class

ShortcutSetResourceTestBase
ResourceTestBase for ShortcutSet entity.

Namespace

Drupal\Tests\shortcut\Functional\Rest

Code

protected function createEntity() {
    $set = ShortcutSet::create([
        'id' => 'llama-set',
        'label' => 'Llama Set',
    ]);
    $set->save();
    return $set;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.