public function testGetUserPlaylist() { $options = array('fields' => array('id', 'uri'), 'market' => 'SE'); $expected = array('fields' => 'id,uri', 'market' => 'SE'); $headers = array('Authorization' => 'Bearer ' . $this->accessToken); $return = array('body' => get_fixture('user-playlist')); $stub = $this->setupStub('GET', '/v1/users/mcgurk/playlists/0UZ0Ll4HJHR7yvURYbHJe9', $expected, $headers, $return); $api = new SpotifyWebAPI\SpotifyWebAPI($stub); $api->setAccessToken($this->accessToken); $response = $api->getUserPlaylist('mcgurk', '0UZ0Ll4HJHR7yvURYbHJe9', $options); $this->assertObjectHasAttribute('id', $response); }