2 Check function with optional arguments.
6 // See comment in php/run-php-tests.sh.
7 //putenv ('LIBGUESTFS_DEBUG=1');
9 $g = guestfs_create ();
11 echo ("Failed to create guestfs_php handle.\n");
14 if (guestfs_add_drive_opts ($g, "/dev/null") == false) {
15 echo ("Failed add_drive_opts, no optional arguments.\n");
18 if (guestfs_add_drive_opts ($g, "/dev/null", 0) == false) {
19 echo ("Failed add_drive_opts, one optional argument.\n");
22 if (guestfs_add_drive_opts ($g, "/dev/null", 1) == false) {
23 echo ("Failed add_drive_opts, one optional argument.\n");
26 if (guestfs_add_drive_opts ($g, "/dev/null", 1, "qcow2") == false) {
27 echo ("Failed add_drive_opts, two optional arguments.\n");
30 echo ("Completed tests OK.\n");