.../src/Functional/EntityResource/EntityResourceTestBase.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index 669382d..197a16a 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -406,6 +406,8 @@ protected function getExpectedCacheContexts() { public function testGet() { $this->initAuthentication(); $has_canonical_url = $this->entity->hasLinkTemplate('canonical'); + // @todo Remove in https://www.drupal.org/node/2825487. + $has_canonical_url = $has_canonical_url && !static::$entityTypeId === 'file'; // The URL and Guzzle request options that will be used in this test. The // request options will be modified/expanded throughout this test: @@ -1230,6 +1232,8 @@ public function testDelete() { $this->initAuthentication(); $has_canonical_url = $this->entity->hasLinkTemplate('canonical'); + // @todo Remove in https://www.drupal.org/node/2825487. + $has_canonical_url = $has_canonical_url && !static::$entityTypeId === 'file'; // The URL and Guzzle request options that will be used in this test. The // request options will be modified/expanded throughout this test: @@ -1345,6 +1349,8 @@ protected function assertNormalizationEdgeCases($method, Url $url, array $reques */ protected function getEntityResourceUrl() { $has_canonical_url = $this->entity->hasLinkTemplate('canonical'); + // @todo Remove in https://www.drupal.org/node/2825487. + $has_canonical_url = $has_canonical_url && !static::$entityTypeId === 'file'; // Note that the 'canonical' link relation type must be specified explicitly // in the call to ::toUrl(). 'canonical' is the default for // \Drupal\Core\Entity\Entity::toUrl(), but ConfigEntityBase overrides this. @@ -1479,6 +1485,8 @@ protected function assert406Response(ResponseInterface $response) { */ protected function assertResourceNotAvailable(Url $url, array $request_options) { $has_canonical_url = $this->entity->hasLinkTemplate('canonical'); + // @todo Remove in https://www.drupal.org/node/2825487. + $has_canonical_url = $has_canonical_url && !static::$entityTypeId === 'file'; $response = $this->request('GET', $url, $request_options); if (!$has_canonical_url) { $this->assertSame(404, $response->getStatusCode());