diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index 5e33c14..eaea09b 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -700,10 +700,10 @@ public function testPost() { $error = [ 'message' => "Validation of the $entity_type_id entity failed", 'errors' => [ - $label_field => "$label_field_capitalized: this field cannot hold more than 1 values.", + $label_field => ["$label_field_capitalized: this field cannot hold more than 1 values."], ], ]; - $this->assertResourceErrorResponse(422, json_encode($error), $response); + $this->assertResourceResponse(422, json_encode($error), $response); $request_options[RequestOptions::BODY] = $parseable_invalid_request_body_2; @@ -714,10 +714,10 @@ public function testPost() { $error = [ 'message' => "Validation of the $entity_type_id entity failed", 'errors' => [ - 'uuid.0.value' => 'UUID: may not be longer than 128 characters.', + 'uuid.0.value' => ['UUID: may not be longer than 128 characters.'], ], ]; - $this->assertResourceErrorResponse(422, json_encode($error), $response); + $this->assertResourceResponse(422, json_encode($error), $response); $request_options[RequestOptions::BODY] = $parseable_invalid_request_body_3; @@ -901,10 +901,10 @@ public function testPatch() { $error = [ 'message' => "Validation of the {$this->entity->getEntityTypeId()} entity failed", 'errors' => [ - $label_field => "$label_field_capitalized: this field cannot hold more than 1 values.", + $label_field => ["$label_field_capitalized: this field cannot hold more than 1 values."], ], ]; - $this->assertResourceErrorResponse(422, json_encode($error), $response); + $this->assertResourceResponse(422, json_encode($error), $response); $request_options[RequestOptions::BODY] = $parseable_invalid_request_body_2;