diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index c72f065..a00cd92 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -424,7 +424,11 @@ public function testGet() { // DX: upon deprovisioning, immediate 404, or 403 if canonical route. $response = $this->request('GET', $url, $request_options); - $this->assertSame($has_canonical_url ? 403 : 404, $response->getStatusCode()); + // In case we have a canonical URL, this will render the normal response. + // As we request for a specific format, and there is no REST resource + // provided we get back a 406. In case we don't have any canonical URL we + // will not find any route. + $this->assertSame($has_canonical_url ? 406 : 404, $response->getStatusCode()); $this->provisionEntityResource();