$group_id, "users" => ["jdoe"], "owners"=> ["jdoe"] ]); $api->serverGroupsPost("localhost", $group_command); $all_groups = $api->serverGroupsGet('localhost'); $has_group_id = array_filter($all_groups, function($b) { global $group_id; return $b->getGroup() == $group_id; }); assert(count($has_group_id) == 1); $saved_group = $api->serverGroupsGroupGet('localhost', $group_id); assert($saved_group->getUsers() == $group_command->getUsers()); assert($saved_group->getOwners() == $group_command->getOwners()); $to_update = new HelixWebServices\Model\GroupCommand([ "users" => ["mmustermann"] ]); $api->serverGroupsGroupPatch('localhost', $group_id, $to_update); $updated = $api->serverGroupsGroupGet('localhost', $group_id); assert($updated->getUsers() == $to_update->getUsers()); $api->serverGroupsGroupDelete('localhost', $group_id); $all_groups2 = $api->serverGroupsGet('localhost'); if (!empty($all_groups2)) { $has_group_id2 = array_filter($all_groups2, function($b) { global $group_id; return $b->getGroup() == $group_id; }); assert(count($has_group_id2) == 0); }