public function testGetUser() { $headers = array('Authorization' => 'Bearer ' . $this->accessToken); $return = array('body' => get_fixture('user')); $stub = $this->setupStub('GET', '/v1/users/mcgurk', array(), $headers, $return); $api = new SpotifyWebAPI\SpotifyWebAPI($stub); $api->setAccessToken($this->accessToken); $response = $api->getUser('mcgurk'); $this->assertObjectHasAttribute('id', $response); }