summaryrefslogtreecommitdiffstats
path: root/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php')
-rw-r--r--core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php54
1 files changed, 0 insertions, 54 deletions
diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php
index c5ca04a..c9ee773 100644
--- a/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php
+++ b/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php
@@ -154,60 +154,6 @@ class MediaHalJsonAnonTest extends MediaResourceTestBase {
/**
* {@inheritdoc}
*/
- protected function getExpectedNormalizedFileEntity() {
- $normalization = parent::getExpectedNormalizedFileEntity();
-
- $owner = static::$auth ? $this->account : User::load(0);
-
- // Cannot use applyHalFieldNormalization() as it uses the $entity property
- // from the test class, which in the case of file upload tests, is the
- // parent entity test entity for the file that's created.
-
- // The HAL normalization adds entity reference fields to '_links' and
- // '_embedded'.
- unset($normalization['uid']);
-
- return $normalization + [
- '_links' => [
- 'self' => [
- // @todo This can use a proper link once
- // https://www.drupal.org/project/drupal/issues/2907402 is complete.
- // This link matches what is generated from from File::url(), a
- // resource URL is currently not available.
- 'href' => file_create_url($normalization['uri'][0]['value']),
- ],
- 'type' => [
- 'href' => $this->baseUrl . '/rest/type/file/file',
- ],
- $this->baseUrl . '/rest/relation/file/file/uid' => [
- ['href' => $this->baseUrl . '/user/' . $owner->id() . '?_format=hal_json']
- ],
- ],
- '_embedded' => [
- $this->baseUrl . '/rest/relation/file/file/uid' => [
- [
- '_links' => [
- 'self' => [
- 'href' => $this->baseUrl . '/user/' . $owner->id() . '?_format=hal_json',
- ],
- 'type' => [
- 'href' => $this->baseUrl . '/rest/type/user/user',
- ],
- ],
- 'uuid' => [
- [
- 'value' => $owner->uuid(),
- ],
- ],
- ],
- ],
- ],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
protected function getNormalizedPostEntity() {
return parent::getNormalizedPostEntity() + [
'_links' => [