예제 #1
0
 public function testGetRecommendations()
 {
     $options = array('limit' => 10, 'seed_tracks' => array('0eGsygTp906u18L0Oimnem', '1lDWb6b6ieDQ2xT7ewTC3G'));
     $expected = array('limit' => 10, 'seed_tracks' => '0eGsygTp906u18L0Oimnem,1lDWb6b6ieDQ2xT7ewTC3G');
     $headers = array('Authorization' => 'Bearer ' . $this->accessToken);
     $return = array('body' => get_fixture('recommendations'));
     $stub = $this->setupStub('GET', '/v1/recommendations', $expected, $headers, $return);
     $api = new SpotifyWebAPI\SpotifyWebAPI($stub);
     $api->setAccessToken($this->accessToken);
     $response = $api->getRecommendations($options);
     $this->assertObjectHasAttribute('seeds', $response);
 }