Ejemplo n.º 1
0
 public function testGetCategoriesList()
 {
     $options = array('country' => 'SE', 'limit' => 10);
     $expected = array('country' => 'SE', 'limit' => 10);
     $headers = array('Authorization' => 'Bearer ' . $this->accessToken);
     $return = array('body' => get_fixture('categories-list'));
     $stub = $this->setupStub('GET', '/v1/browse/categories', $expected, $headers, $return);
     $api = new SpotifyWebAPI\SpotifyWebAPI($stub);
     $api->setAccessToken($this->accessToken);
     $response = $api->getCategoriesList($options);
     $this->assertObjectHasAttribute('categories', $response);
 }