コード例 #1
0
 public function testGetArtistRelatedArtists()
 {
     $headers = array('Authorization' => 'Bearer ' . $this->accessToken);
     $return = array('body' => get_fixture('artist-related-artists'));
     $stub = $this->setupStub('GET', '/v1/artists/36QJpDe2go2KgaRleHCDTp/related-artists', array(), $headers, $return);
     $api = new SpotifyWebAPI\SpotifyWebAPI($stub);
     $api->setAccessToken($this->accessToken);
     $response = $api->getArtistRelatedArtists('36QJpDe2go2KgaRleHCDTp');
     $this->assertNotEmpty($response->artists);
 }