$client_id, "host" => null, "altRoots" => ['/alt/1', '/alt/2'] ]); $api->serverClientsPost("localhost", $client_command); $all_clients = $api->serverClientsGet('localhost'); $has_client_id = array_filter($all_clients, function($b) { global $client_id; return $b->getClient() == $client_id; }); assert(count($has_client_id) == 1); $saved_client = $api->serverClientsClientGet('localhost', $client_id); assert($saved_client->getAltRoots() == $client_command->getAltRoots()); $to_update = new HelixWebServices\Model\ClientCommand([ "description" => "Update $rand" ]); $api->serverClientsClientPatch('localhost', $client_id, $to_update); $updated = $api->serverClientsClientGet('localhost', $client_id); assert(trim($updated->getDescription()) == trim($to_update->getDescription())); $api->serverClientsClientDelete('localhost', $client_id); $all_clients2 = $api->serverClientsGet('localhost'); assert(empty($all_clients2));