function WorkspaceTest::createEntity
Same name in other branches
- 11.x core/modules/jsonapi/tests/src/Functional/WorkspaceTest.php \Drupal\Tests\jsonapi\Functional\WorkspaceTest::createEntity()
Overrides ResourceTestBase::createEntity
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ WorkspaceTest.php, line 101
Class
- WorkspaceTest
- JSON:API integration test for the "Workspace" content entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function createEntity() : EntityInterface {
$entity = Workspace::create([
'id' => 'campaign',
'label' => 'Campaign',
'uid' => $this->account
->id(),
'created' => 123456789,
]);
$entity->save();
return $entity;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.