X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fhal%2Ftests%2Fsrc%2FFunctional%2FEntityResource%2FMedia%2FMediaHalJsonAnonTest.php;fp=web%2Fcore%2Fmodules%2Fhal%2Ftests%2Fsrc%2FFunctional%2FEntityResource%2FMedia%2FMediaHalJsonAnonTest.php;h=0000000000000000000000000000000000000000;hp=c9ee7733cfa36820b1b03d6343f9590d9857cb2b;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php b/web/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php deleted file mode 100644 index c9ee7733c..000000000 --- a/web/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php +++ /dev/null @@ -1,174 +0,0 @@ -applyHalFieldNormalization($default_normalization); - - $file = File::load(1); - $thumbnail = File::load(2); - $author = User::load($this->entity->getOwnerId()); - return $normalization + [ - '_links' => [ - 'self' => [ - 'href' => $this->baseUrl . '/media/1?_format=hal_json', - ], - 'type' => [ - 'href' => $this->baseUrl . '/rest/type/media/camelids', - ], - $this->baseUrl . '/rest/relation/media/camelids/field_media_file' => [ - [ - 'href' => $file->url(), - 'lang' => 'en', - ], - ], - $this->baseUrl . '/rest/relation/media/camelids/revision_user' => [ - [ - 'href' => $this->baseUrl . '/user/' . $author->id() . '?_format=hal_json', - ], - ], - $this->baseUrl . '/rest/relation/media/camelids/thumbnail' => [ - [ - 'href' => $thumbnail->url(), - 'lang' => 'en', - ], - ], - $this->baseUrl . '/rest/relation/media/camelids/uid' => [ - [ - 'href' => $this->baseUrl . '/user/' . $author->id() . '?_format=hal_json', - 'lang' => 'en', - ], - ], - ], - '_embedded' => [ - $this->baseUrl . '/rest/relation/media/camelids/field_media_file' => [ - [ - '_links' => [ - 'self' => [ - 'href' => $file->url(), - ], - 'type' => [ - 'href' => $this->baseUrl . '/rest/type/file/file', - ], - ], - 'lang' => 'en', - 'uuid' => [ - [ - 'value' => $file->uuid(), - ], - ], - ], - ], - $this->baseUrl . '/rest/relation/media/camelids/revision_user' => [ - [ - '_links' => [ - 'self' => [ - 'href' => $this->baseUrl . '/user/' . $author->id() . '?_format=hal_json', - ], - 'type' => [ - 'href' => $this->baseUrl . '/rest/type/user/user', - ], - ], - 'uuid' => [ - [ - 'value' => $author->uuid(), - ], - ], - ], - ], - $this->baseUrl . '/rest/relation/media/camelids/thumbnail' => [ - [ - '_links' => [ - 'self' => [ - 'href' => $thumbnail->url(), - ], - 'type' => [ - 'href' => $this->baseUrl . '/rest/type/file/file', - ], - ], - 'lang' => 'en', - 'uuid' => [ - [ - 'value' => $thumbnail->uuid(), - ], - ], - ], - ], - $this->baseUrl . '/rest/relation/media/camelids/uid' => [ - [ - '_links' => [ - 'self' => [ - 'href' => $this->baseUrl . '/user/' . $author->id() . '?_format=hal_json', - ], - 'type' => [ - 'href' => $this->baseUrl . '/rest/type/user/user', - ], - ], - 'uuid' => [ - [ - 'value' => $author->uuid(), - ], - ], - 'lang' => 'en', - ], - ], - ], - ]; - } - - /** - * {@inheritdoc} - */ - protected function getNormalizedPostEntity() { - return parent::getNormalizedPostEntity() + [ - '_links' => [ - 'type' => [ - 'href' => $this->baseUrl . '/rest/type/media/camelids', - ], - ], - ]; - } - - /** - * {@inheritdoc} - */ - protected function getExpectedCacheTags() { - return Cache::mergeTags(parent::getExpectedCacheTags(), ['config:hal.settings']); - } - -}