Commit 71b89659 authored by catch's avatar catch
Browse files

Issue #3248801 by daffie, rakesh.gectcr, bbrala, longwave: [Symfony 6] The...

Issue #3248801 by daffie, rakesh.gectcr, bbrala, longwave: [Symfony 6] The Drupal\Tests\jsonapi\Functional\JsonApiFunctionalTest fails with Symfony 5

(cherry picked from commit 5281af28)
parent 93f04169
......@@ -660,7 +660,7 @@ public function testWrite() {
$created_response = Json::decode($response->getBody()->__toString());
$this->assertEquals(422, $response->getStatusCode());
$this->assertNotEmpty($created_response['errors']);
$this->assertEquals('Unprocessable Entity', $created_response['errors'][0]['title']);
$this->assertStringStartsWith('Unprocessable', $created_response['errors'][0]['title']);
// 6.2 Relationships are not included in "data".
$malformed_body = $body;
unset($malformed_body['data']['relationships']);
......@@ -849,7 +849,7 @@ public function testWrite() {
$this->assertEquals(422, $response->getStatusCode());
$this->assertCount(2, $updated_response['errors']);
for ($i = 0; $i < 2; $i++) {
$this->assertEquals("Unprocessable Entity", $updated_response['errors'][$i]['title']);
$this->assertStringStartsWith('Unprocessable', $updated_response['errors'][$i]['title']);
$this->assertEquals(422, $updated_response['errors'][$i]['status']);
}
$this->assertEquals("title: This value should not be null.", $updated_response['errors'][0]['detail']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment