abstract protected function EntityResourceTestBase::getNormalizedPostEntity in Drupal 9
Same name and namespace in other branches
- 8 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
4 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::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.
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\EntityResourceCode
protected abstract function getNormalizedPostEntity();