X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Faggregator%2Ftests%2Fsrc%2FFunctional%2FHal%2FFeedHalJsonTestBase.php;fp=web%2Fcore%2Fmodules%2Faggregator%2Ftests%2Fsrc%2FFunctional%2FHal%2FFeedHalJsonTestBase.php;h=7fa28700122c2834109feaefeeb8d1cc46311b2e;hp=0000000000000000000000000000000000000000;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonTestBase.php b/web/core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonTestBase.php new file mode 100644 index 000000000..7fa287001 --- /dev/null +++ b/web/core/modules/aggregator/tests/src/Functional/Hal/FeedHalJsonTestBase.php @@ -0,0 +1,60 @@ +applyHalFieldNormalization($default_normalization); + + return $normalization + [ + '_links' => [ + 'self' => [ + 'href' => $this->baseUrl . '/aggregator/sources/1?_format=hal_json', + ], + 'type' => [ + 'href' => $this->baseUrl . '/rest/type/aggregator_feed/aggregator_feed', + ], + ], + ]; + } + + /** + * {@inheritdoc} + */ + protected function getNormalizedPostEntity() { + return parent::getNormalizedPostEntity() + [ + '_links' => [ + 'type' => [ + 'href' => $this->baseUrl . '/rest/type/aggregator_feed/aggregator_feed', + ], + ], + ]; + } + +}