コード例 #1
0
 public function testGetUserFollowedArtists()
 {
     $options = array('limit' => 10);
     $expected = array('limit' => 10, 'type' => 'artist');
     $headers = array('Authorization' => 'Bearer ' . $this->accessToken);
     $return = array('body' => get_fixture('user-followed-artists'));
     $stub = $this->setupStub('GET', '/v1/me/following', $expected, $headers, $return);
     $api = new SpotifyWebAPI\SpotifyWebAPI($stub);
     $api->setAccessToken($this->accessToken);
     $response = $api->getUserFollowedArtists($options);
     $this->assertObjectHasAttribute('artists', $response);
 }