mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 13:54:59 +00:00
apply rules rector up to php82
This commit is contained in:
@@ -316,7 +316,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
json_encode(['type' => 'person', 'id' => $personId], JSON_THROW_ON_ERROR)
|
||||
);
|
||||
$response = $this->client->getResponse();
|
||||
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
|
||||
|
||||
@@ -338,7 +338,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
}
|
||||
|
||||
$response = $this->client->getResponse();
|
||||
$data = json_decode($response->getContent(), null, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode((string) $response->getContent(), null, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
// check that the person id is contained
|
||||
$participationsPersonsIds = array_map(
|
||||
@@ -358,7 +358,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
json_encode(['type' => 'person', 'id' => $personId], JSON_THROW_ON_ERROR)
|
||||
);
|
||||
$response = $this->client->getResponse();
|
||||
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
|
||||
|
||||
@@ -394,7 +394,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
$this->markTestSkipped('the next tests should appears only on valid accompanying period');
|
||||
}
|
||||
|
||||
$data = json_decode($this->client->getResponse()->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode((string) $this->client->getResponse()->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
$this->assertArrayHasKey('id', $data);
|
||||
$this->assertArrayHasKey('type', $data);
|
||||
$this->assertEquals('social_issue', $data['type']);
|
||||
@@ -425,7 +425,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
$this->markTestSkipped('the next tests should appears only on valid accompanying period');
|
||||
}
|
||||
|
||||
$data = json_decode($response->getContent(), null, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode((string) $response->getContent(), null, 512, JSON_THROW_ON_ERROR);
|
||||
$this->assertEquals(
|
||||
$data->id,
|
||||
$periodId,
|
||||
@@ -487,7 +487,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
json_encode(['type' => 'accompanying_period_comment', 'content' => 'this is a text'])
|
||||
);
|
||||
$response = $this->client->getResponse();
|
||||
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
|
||||
|
||||
@@ -506,7 +506,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
json_encode(['type' => 'accompanying_period_comment', 'id' => $data['id']], JSON_THROW_ON_ERROR)
|
||||
);
|
||||
$response = $this->client->getResponse();
|
||||
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
|
||||
}
|
||||
@@ -563,7 +563,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
json_encode(['type' => 'person', 'id' => $personId], JSON_THROW_ON_ERROR)
|
||||
);
|
||||
$response = $this->client->getResponse();
|
||||
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
|
||||
|
||||
@@ -590,7 +590,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
json_encode(['type' => 'thirdparty', 'id' => $thirdPartyId], JSON_THROW_ON_ERROR)
|
||||
);
|
||||
$response = $this->client->getResponse();
|
||||
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
|
||||
|
||||
@@ -644,7 +644,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
json_encode(['type' => 'accompanying_period_resource', 'resource' => ['type' => 'person', 'id' => $personId]])
|
||||
);
|
||||
$response = $this->client->getResponse();
|
||||
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
|
||||
|
||||
@@ -688,7 +688,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
json_encode(['type' => 'accompanying_period_resource', 'resource' => ['type' => 'thirdparty', 'id' => $thirdPartyId]])
|
||||
);
|
||||
$response = $this->client->getResponse();
|
||||
$data = json_decode($response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
$data = json_decode((string) $response->getContent(), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->assertTrue(in_array($response->getStatusCode(), [200, 422], true));
|
||||
|
||||
|
Reference in New Issue
Block a user