You are here

abstract protected function EntityResourceTestBase::createEntity in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::createEntity()
  2. 9 core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::createEntity()

Creates the entity to be tested.

Return value

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

1 call to EntityResourceTestBase::createEntity()
EntityResourceTestBase::setUp in core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
10 methods override EntityResourceTestBase::createEntity()
ActionResourceTestBase::createEntity in core/modules/system/tests/src/Functional/Rest/ActionResourceTestBase.php
Creates the entity to be tested.
ContactFormResourceTestBase::createEntity in core/modules/contact/tests/src/Functional/Rest/ContactFormResourceTestBase.php
Creates the entity to be tested.
FileResourceTestBase::createEntity in core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php
Creates the entity to be tested.
MediaResourceTestBase::createEntity in core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php
Creates the entity to be tested.
MediaTypeResourceTestBase::createEntity in core/modules/media/tests/src/Functional/Rest/MediaTypeResourceTestBase.php
Creates the entity to be tested.

... See full list

File

core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php, line 246

Class

EntityResourceTestBase
Even though there is the generic EntityResource, it's necessary for every entity type to have its own test, because they each have different fields, validation constraints, et cetera. It's not because the generic case works, that every case…

Namespace

Drupal\Tests\rest\Functional\EntityResource

Code

protected abstract function createEntity();