You are here

protected function WorkspaceResourceTestBase::createEntity in Workspace 8.2

Creates the entity to be tested.

Return value

\Drupal\Core\Entity\EntityInterface The entity to be tested.

Overrides EntityResourceTestBase::createEntity

File

tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php, line 65

Class

WorkspaceResourceTestBase
Base class for workspace EntityResource tests.

Namespace

Drupal\Tests\workspace\Functional\EntityResource

Code

protected function createEntity() {
  $workspace = Workspace::create([
    'id' => 'layla',
    'label' => 'Layla',
    'target' => 'live',
  ]);
  $workspace
    ->save();
  return $workspace;
}