.../rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index 59cacc1..0be12c8 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -560,6 +560,7 @@ public function testPost() { // DX: 404 when resource not provisioned, but HTML if canonical route. $response = $this->request('POST', $url, $request_options); if ($has_canonical_url) { + // Tricky: '/user' is also a non-REST route! $this->assertSame(static::$entityTypeId === 'user' ? 405 : 404, $response->getStatusCode()); $this->assertSame(['text/html; charset=UTF-8'], $response->getHeader('Content-Type')); } @@ -573,6 +574,7 @@ public function testPost() { // DX: 404 when resource not provisioned. $response = $this->request('POST', $url, $request_options); + // Tricky: '/user' is also a non-REST route! if (static::$entityTypeId === 'user') { $this->assertResourceErrorResponse(405, 'No route found for "POST ' . str_replace($this->baseUrl, '', $this->getPostUrl()->setAbsolute()->toString()) . '": Method Not Allowed (Allow: GET, HEAD)', $response); }