コード例 #1
0
 public function testGetCategoryPlaylists()
 {
     $options = array('country' => 'SE', 'limit' => 10);
     $expected = array('country' => 'SE', 'limit' => 10);
     $headers = array('Authorization' => 'Bearer ' . $this->accessToken);
     $return = array('body' => get_fixture('category-playlists'));
     $stub = $this->setupStub('GET', '/v1/browse/categories/party/playlists', $expected, $headers, $return);
     $api = new SpotifyWebAPI\SpotifyWebAPI($stub);
     $api->setAccessToken($this->accessToken);
     $response = $api->getCategoryPlaylists('party', $options);
     $this->assertObjectHasAttribute('playlists', $response);
 }