protected function WorkspaceResourceTestBase::createEntity in Drupal 8
Same name and namespace in other branches
- 9 core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php \Drupal\Tests\workspaces\Functional\EntityResource\WorkspaceResourceTestBase::createEntity()
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides EntityResourceTestBase::createEntity
File
- core/
modules/ workspaces/ tests/ src/ Functional/ EntityResource/ WorkspaceResourceTestBase.php, line 70
Class
- WorkspaceResourceTestBase
- Base class for workspace EntityResource tests.
Namespace
Drupal\Tests\workspaces\Functional\EntityResourceCode
protected function createEntity() {
$workspace = Workspace::create([
'id' => 'layla',
'label' => 'Layla',
]);
$workspace
->save();
return $workspace;
}