getClientAuthenticated(); $client->request(Request::METHOD_GET, sprintf('/api/1.0/person/social-work/social-issue/%d.json', $socialIssue['id'])); $this->assertEquals(200, $client->getResponse()->getStatusCode()); $data = json_decode($client->getResponse()->getContent(), true); $this->assertArrayHasKey('id', $data); $this->assertArrayHasKey('type', $data); } public function testList(): array { $client = $this->getClientAuthenticated(); $client->request(Request::METHOD_GET, '/api/1.0/person/social-work/social-issue.json'); $this->assertEquals(200, $client->getResponse()->getStatusCode()); $data = json_decode($client->getResponse()->getContent(), true); $this->assertGreaterThan(0, $data['count']); $this->assertGreaterThan(0, count($data['results'])); return $data; } }