getClientAuthenticated(); $client->request(Request::METHOD_GET, '/api/1.0/main/user.json'); $this->assertResponseIsSuccessful(); $data = \json_decode($client->getResponse()->getContent(), true); $this->assertTrue(\array_key_exists('count', $data)); $this->assertGreaterThan(0, $data['count']); $this->assertTrue(\array_key_exists('results', $data)); return $data['results'][0]; } /** * @depends testIndex */ public function testEntity($existingUser) { $client = $this->getClientAuthenticated(); $client->request(Request::METHOD_GET, '/api/1.0/main/user/'.$existingUser['id'].'.json'); $this->assertResponseIsSuccessful(); } public function testWhoami() { $client = $this->getClientAuthenticated(); $client->request(Request::METHOD_GET, '/api/1.0/main/whoami.json'); $this->assertResponseIsSuccessful(); } }