Ejemplo n.º 1
0
 public function testGetTracks()
 {
     $tracks = array('0eGsygTp906u18L0Oimnem', '1lDWb6b6ieDQ2xT7ewTC3G');
     $options = array('market' => 'SE');
     $expected = array('ids' => '0eGsygTp906u18L0Oimnem,1lDWb6b6ieDQ2xT7ewTC3G', 'market' => 'SE');
     $headers = array('Authorization' => 'Bearer ' . $this->accessToken);
     $return = array('body' => get_fixture('tracks'));
     $stub = $this->setupStub('GET', '/v1/tracks/', $expected, $headers, $return);
     $api = new SpotifyWebAPI\SpotifyWebAPI($stub);
     $api->setAccessToken($this->accessToken);
     $response = $api->getTracks($tracks, $options);
     $this->assertNotEmpty($response->tracks);
 }