protected function UserHalJsonAnonTest::getExpectedNormalizedEntity in Drupal 9
Same name and namespace in other branches
- 8 core/modules/user/tests/src/Functional/Hal/UserHalJsonAnonTest.php \Drupal\Tests\user\Functional\Hal\UserHalJsonAnonTest::getExpectedNormalizedEntity()
Returns the expected normalization of the entity.
Return value
array
Overrides UserResourceTestBase::getExpectedNormalizedEntity
See also
::createEntity()
File
- core/
modules/ user/ tests/ src/ Functional/ Hal/ UserHalJsonAnonTest.php, line 40
Class
- UserHalJsonAnonTest
- @group hal
Namespace
Drupal\Tests\user\Functional\HalCode
protected function getExpectedNormalizedEntity() {
$default_normalization = parent::getExpectedNormalizedEntity();
$normalization = $this
->applyHalFieldNormalization($default_normalization);
return $normalization + [
'_links' => [
'self' => [
'href' => $this->baseUrl . '/user/3?_format=hal_json',
],
'type' => [
'href' => $this->baseUrl . '/rest/type/user/user',
],
],
];
}