$depot_id, 'type' => 'local', 'map' => "$depot_id/...", 'description' => "test $rand" ]); $api->serverDepotsPost("localhost", $depot_command); $all_depots = $api->serverDepotsGet('localhost'); $has_depot_id = array_filter($all_depots, function($b) { global $depot_id; return $b->getDepot() == $depot_id; }); assert(count($has_depot_id) == 1); $saved_depot = $api->serverDepotsDepotGet('localhost', $depot_id); assert(trim($saved_depot->getDescription()) == trim($depot_command->getDescription())); $to_update = new HelixWebServices\Model\DepotCommand([ "description" => "Update $rand" ]); $api->serverDepotsDepotPatch('localhost', $depot_id, $to_update); $updated = $api->serverDepotsDepotGet('localhost', $depot_id); assert(trim($updated->getDescription()) == trim($to_update->getDescription())); $api->serverDepotsDepotDelete('localhost', $depot_id); $all_depots2 = $api->serverDepotsGet('localhost'); $has_depot_id2 = array_filter($all_depots2, function($b) { global $depot_id; return $b->getDepot() == $depot_id; }); assert(count($has_depot_id2) == 0);