.../tests/src/Functional/EntityResource/EntityResourceTestBase.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index 2de3852..133e8d2 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -869,6 +869,11 @@ public function testPost() { } + // DX: 409 when POSTing to an existing entity. + $response = $this->request('POST', $this->getEntityResourceUrl()->setOption('query', ['_format' => static::$format]), $request_options); + $this->assertResourceErrorResponse(409, 'POSTING to an already existing entity resource', $response); + + $this->config('rest.settings')->set('bc_entity_resource_permissions', TRUE)->save(TRUE); $this->refreshTestStateAfterRestConfigChange(); $request_options[RequestOptions::BODY] = $parseable_valid_request_body_2;