function EntityResourceTestBase::getNormalizedPostEntity

Same name in other branches
  1. 9 core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getNormalizedPostEntity()
  2. 10 core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getNormalizedPostEntity()
  3. 11.x core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getNormalizedPostEntity()

Returns the normalized POST entity.

Return value

array

See also

::testPost

5 calls to EntityResourceTestBase::getNormalizedPostEntity()
EntityResourceTestBase::assertNormalizationEdgeCases in core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
Asserts normalization-specific edge cases.
EntityResourceTestBase::getModifiedEntityForPostTesting in core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
Gets the normalized POST entity with random values for its unique fields.
EntityResourceTestBase::getNormalizedPatchEntity in core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
Returns the normalized PATCH entity.
EntityResourceTestBase::getSecondNormalizedPostEntity in core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
Gets the second normalized POST entity.
EntityResourceTestBase::testPost in core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
Tests a POST request for an entity, plus edge cases to ensure good DX.
50 methods override EntityResourceTestBase::getNormalizedPostEntity()
ActionResourceTestBase::getNormalizedPostEntity in core/modules/system/tests/src/Functional/Rest/ActionResourceTestBase.php
Returns the normalized POST entity.
BaseFieldOverrideResourceTestBase::getNormalizedPostEntity in core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php
Returns the normalized POST entity.
BlockContentResourceTestBase::getNormalizedPostEntity in core/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php
Returns the normalized POST entity.
BlockContentTypeResourceTestBase::getNormalizedPostEntity in core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php
Returns the normalized POST entity.
BlockResourceTestBase::getNormalizedPostEntity in core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php
Returns the normalized POST entity.

... See full list

File

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

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 getNormalizedPostEntity();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.