public function testReorderUserPlaylistTracks() { $options = array('insert_before' => 20, 'range_length' => 5, 'range_start' => 0); $expected = json_encode(array('insert_before' => 20, 'range_length' => 5, 'range_start' => 0)); $headers = array('Authorization' => 'Bearer ' . $this->accessToken, 'Content-Type' => 'application/json'); $return = array('body' => get_fixture('snapshot-id')); $stub = $this->setupStub('PUT', '/v1/users/mcgurk/playlists/0UZ0Ll4HJHR7yvURYbHJe9/tracks', $expected, $headers, $return); $api = new SpotifyWebAPI\SpotifyWebAPI($stub); $api->setAccessToken($this->accessToken); $response = $api->reorderUserPlaylistTracks('mcgurk', '0UZ0Ll4HJHR7yvURYbHJe9', $options); $this->assertNotFalse($response); }