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