Пример #1
0
 public function testGetMyTop()
 {
     $options = array('limit' => 10, 'time_range' => 'long_term');
     $expected = array('limit' => 10, 'time_range' => 'long_term');
     $headers = array('Authorization' => 'Bearer ' . $this->accessToken);
     $return = array('body' => get_fixture('top-artists-and-tracks'));
     $stub = $this->setupStub('GET', '/v1/me/top/artists', $expected, $headers, $return);
     $api = new SpotifyWebAPI\SpotifyWebAPI($stub);
     $api->setAccessToken($this->accessToken);
     $response = $api->getMyTop('artists', $options);
     $this->assertObjectHasAttribute('items', $response);
 }