function EntityTestResourceTestBase::getExpectedNormalizedEntity
Same name in other branches
- 9 core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestResourceTestBase::getExpectedNormalizedEntity()
- 10 core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestResourceTestBase::getExpectedNormalizedEntity()
- 11.x core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestResourceTestBase.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestResourceTestBase::getExpectedNormalizedEntity()
Overrides EntityResourceTestBase::getExpectedNormalizedEntity
6 calls to EntityTestResourceTestBase::getExpectedNormalizedEntity()
- EntityTestDateonlyTest::getExpectedNormalizedEntity in core/
modules/ datetime/ tests/ src/ Functional/ EntityResource/ EntityTest/ EntityTestDateonlyTest.php - Returns the expected normalization of the entity.
- EntityTestDateRangeTest::getExpectedNormalizedEntity in core/
modules/ datetime_range/ tests/ src/ Functional/ EntityResource/ EntityTest/ EntityTestDateRangeTest.php - Returns the expected normalization of the entity.
- EntityTestDatetimeTest::getExpectedNormalizedEntity in core/
modules/ datetime/ tests/ src/ Functional/ EntityResource/ EntityTest/ EntityTestDatetimeTest.php - Returns the expected normalization of the entity.
- EntityTestHalJsonAnonTest::getExpectedNormalizedEntity in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Hal/ EntityTestHalJsonAnonTest.php - Returns the expected normalization of the entity.
- EntityTestJsonInternalPropertyNormalizerTest::getExpectedNormalizedEntity in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestJsonInternalPropertyNormalizerTest.php - Returns the expected normalization of the entity.
6 methods override EntityTestResourceTestBase::getExpectedNormalizedEntity()
- EntityTestDateonlyTest::getExpectedNormalizedEntity in core/
modules/ datetime/ tests/ src/ Functional/ EntityResource/ EntityTest/ EntityTestDateonlyTest.php - Returns the expected normalization of the entity.
- EntityTestDateRangeTest::getExpectedNormalizedEntity in core/
modules/ datetime_range/ tests/ src/ Functional/ EntityResource/ EntityTest/ EntityTestDateRangeTest.php - Returns the expected normalization of the entity.
- EntityTestDatetimeTest::getExpectedNormalizedEntity in core/
modules/ datetime/ tests/ src/ Functional/ EntityResource/ EntityTest/ EntityTestDatetimeTest.php - Returns the expected normalization of the entity.
- EntityTestHalJsonAnonTest::getExpectedNormalizedEntity in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Hal/ EntityTestHalJsonAnonTest.php - Returns the expected normalization of the entity.
- EntityTestJsonInternalPropertyNormalizerTest::getExpectedNormalizedEntity in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestJsonInternalPropertyNormalizerTest.php - Returns the expected normalization of the entity.
File
-
core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestResourceTestBase.php, line 86
Class
Namespace
Drupal\Tests\entity_test\Functional\RestCode
protected function getExpectedNormalizedEntity() {
$author = User::load(0);
$normalization = [
'uuid' => [
[
'value' => $this->entity
->uuid(),
],
],
'id' => [
[
'value' => 1,
],
],
'langcode' => [
[
'value' => 'en',
],
],
'type' => [
[
'value' => 'entity_test',
],
],
'name' => [
[
'value' => 'Llama',
],
],
'created' => [
$this->formatExpectedTimestampItemValues((int) $this->entity
->get('created')->value),
],
'user_id' => [
[
'target_id' => (int) $author->id(),
'target_type' => 'user',
'target_uuid' => $author->uuid(),
'url' => $author->toUrl()
->toString(),
],
],
'field_test_text' => [],
];
return $normalization;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.