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