$branch_id, "view" => [ "//depot/main/$branch_id/... //depot/dev/$branch_id/..." ] ]); $error_thrown = false; try { $api->serverBranchesPost("illegal", $branch_command); } catch (Exception $e) { $error_thrown = true; } assert($error_thrown);