abstract protected function EntityResourceTestBase::getNormalizedPostEntity in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getNormalizedPostEntity()
- 9 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.
24 methods override EntityResourceTestBase::getNormalizedPostEntity()
- ActionResourceTestBase::getNormalizedPostEntity in core/
modules/ system/ tests/ src/ Functional/ Rest/ ActionResourceTestBase.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.
- ConfigTestResourceTestBase::getNormalizedPostEntity in core/
modules/ config/ tests/ config_test/ tests/ src/ Functional/ Rest/ ConfigTestResourceTestBase.php - Returns the normalized POST entity.
- ContactFormResourceTestBase::getNormalizedPostEntity in core/
modules/ contact/ tests/ src/ Functional/ Rest/ ContactFormResourceTestBase.php - Returns the normalized POST entity.
File
- core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ EntityResourceTestBase.php, line 280
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();