diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index e154a75249..1224b45d94 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -671,6 +671,7 @@ public function testPatch() { $response = $this->request('PATCH', $url, $request_options); if ($has_canonical_url) { $this->assertSame(405, $response->getStatusCode()); + $this->assertSame(['GET, POST, HEAD'], $response->getHeader('Allow')); $this->assertSame(['text/html; charset=UTF-8'], $response->getHeader('Content-Type')); } else { @@ -683,6 +684,7 @@ public function testPatch() { // DX: 405 when resource not provisioned. $response = $this->request('PATCH', $url, $request_options); + $this->assertSame(['GET, POST, HEAD'], $response->getHeader('Allow')); $this->assertResourceErrorResponse(405, 'No route found for "PATCH ' . str_replace($this->baseUrl, '', $this->getUrl()->setAbsolute()->toString()) . '": Method Not Allowed (Allow: GET, POST, HEAD)', $response); @@ -870,6 +872,7 @@ public function testDelete() { $response = $this->request('DELETE', $url, $request_options); if ($has_canonical_url) { $this->assertSame(405, $response->getStatusCode()); + $this->assertSame(['GET, POST, HEAD'], $response->getHeader('Allow')); $this->assertSame(['text/html; charset=UTF-8'], $response->getHeader('Content-Type')); } else { @@ -882,6 +885,7 @@ public function testDelete() { // DX: 405 when resource not provisioned. $response = $this->request('DELETE', $url, $request_options); + $this->assertSame(['GET, POST, HEAD'], $response->getHeader('Allow')); $this->assertResourceErrorResponse(405, 'No route found for "DELETE ' . str_replace($this->baseUrl, '', $this->getUrl()->setAbsolute()->toString()) . '": Method Not Allowed (Allow: GET, POST, HEAD)', $response);