Lines Matching refs:unlink
2 Testing unlink() function : error conditions
11 /* Prototype : bool unlink ( string $filename [, resource $context] );
24 echo "*** Testing unlink() : error conditions ***\n";
26 echo "-- Testing unlink() on unexpected no. of arguments --\n";
28 var_dump( unlink() );
30 var_dump( unlink($filename, $context, true) );
33 echo "\n-- Testing unlink() on invalid arguments --\n";
35 var_dump( unlink('') ); // $filename as empty string
38 var_dump( unlink(NULL) ); // $filename as NULL
41 var_dump( unlink(false) ); // $filename as boolean false
44 var_dump( unlink($filename, '') ); // $context as empty string
45 var_dump( unlink($filename, false) ); // $context as boolean false
46 var_dump( unlink($filename, NULL) ); // $context as NULL
49 echo "\n-- Testing unlink() on non-existent file --\n";
50 var_dump( unlink(dirname(__FILE__)."/non_existent_file.tmp") );
52 echo "\n-- Testing unlink() on directory --\n";
58 var_dump( unlink($dirname) ); // expected: false as unlink() does not work on dir
64 unlink(dirname(__FILE__)."/unlink_error.tmp");
68 *** Testing unlink() : error conditions ***
69 -- Testing unlink() on unexpected no. of arguments --
71 Warning: unlink() expects at least 1 parameter, 0 given in %s on line %d
74 Warning: unlink() expects at most 2 parameters, 3 given in %s on line %d
78 -- Testing unlink() on invalid arguments --
80 Warning: unlink(): %s in %s on line %d
84 Warning: unlink(): %s in %s on line %d
88 Warning: unlink(): %s in %s on line %d
92 Warning: unlink() expects parameter 2 to be resource, %unicode_string_optional% given in %s on line…
95 Warning: unlink() expects parameter 2 to be resource, boolean given in %s on line %d
98 Warning: unlink() expects parameter 2 to be resource, null given in %s on line %d
101 -- Testing unlink() on non-existent file --
103 Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
106 -- Testing unlink() on directory --
108 Warning: unlink(%s/unlink_error): %s in %s on line %d