function ShortcutSetResourceTestBase::createEntity
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides EntityResourceTestBase::createEntity
File
- 
              core/
modules/ shortcut/ tests/ src/ Functional/ Rest/ ShortcutSetResourceTestBase.php, line 58  
Class
- ShortcutSetResourceTestBase
 - ResourceTestBase for ShortcutSet entity.
 
Namespace
Drupal\Tests\shortcut\Functional\RestCode
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.