File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -393,8 +393,16 @@ public function testGetUserPlaylists()
393393
394394 public function testGetUserPlaylistsWhereUserDoesNotExist ()
395395 {
396- $ this ->setExpectedException ('Audeio\Spotify\Exception\SpotifyException ' , 'No such user ' );
396+ // TODO: Check with Spotify is this is really meant to return an empty Pagination object
397+ // $this->setExpectedException('Audeio\Spotify\Exception\SpotifyException', 'No such user');
398+
399+ $ response = $ this ->api ->getUserPlaylists ('fake-user-made-up-by-me-for-testing-93874123 ' );
397400
398- $ this ->api ->getUserPlaylists ('fake-user-made-up-by-me-for-testing-93874123 ' );
401+ $ this ->assertInstanceOf ('Audeio\Spotify\Entity\PlaylistPagination ' , $ response );
402+ $ this ->assertNotNull ($ response ->getHref ());
403+ $ this ->assertSame (0 , $ response ->getItems ()->count ());
404+ $ this ->assertSame (0 , $ response ->getLimit ());
405+ $ this ->assertNotNull ($ response ->getOffset ());
406+ $ this ->assertNotNull ($ response ->getTotal ());
399407 }
400408}
You can’t perform that action at this time.
0 commit comments