getClientAuthenticated(); $client->request(Request::METHOD_GET, '/api/1.0/main/user/' . $existingUser['id'] . '.json'); $this->assertResponseIsSuccessful(); } public function testIndex() { $client = $this->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]; } public function testUserCurrentLocation() { $client = $this->getClientAuthenticated(); $client->request(Request::METHOD_GET, '/api/1.0/main/user-current-location.json'); $this->assertResponseIsSuccessful(); } public function testWhoami() { $client = $this->getClientAuthenticated(); $client->request(Request::METHOD_GET, '/api/1.0/main/whoami.json'); $this->assertResponseIsSuccessful(); } }