1--TEST--
2Test readlink() function: usage variations - invalid filenames
3--CREDITS--
4Dave Kelsey <d_kelsey@uk.ibm.com>
5--CONFLICTS--
6obscure_filename
7--FILE--
8<?php
9/* Testing readlink() with invalid arguments -int, float, bool, NULL, resource */
10
11$file_path = __DIR__;
12
13echo "*** Testing Invalid file types ***\n";
14$filenames = array(
15  /* Invalid filenames */
16  -2.34555,
17  "",
18  TRUE,
19  FALSE,
20
21  /* scalars */
22  1234,
23  0
24);
25
26/* loop through to test each element the above array */
27foreach( $filenames as $filename ) {
28  var_dump( readlink($filename) );
29  clearstatcache();
30}
31?>
32--CLEAN--
33<?php
34$file_path = __DIR__;
35unlink($file_path."/readlink_variation2.tmp");
36?>
37--EXPECTF--
38*** Testing Invalid file types ***
39
40Warning: readlink(): %s in %s on line %d
41bool(false)
42
43Warning: readlink(): %s in %s on line %d
44bool(false)
45
46Warning: readlink(): %s in %s on line %d
47bool(false)
48
49Warning: readlink(): %s in %s on line %d
50bool(false)
51
52Warning: readlink(): %s in %s on line %d
53bool(false)
54
55Warning: readlink(): %s in %s on line %d
56bool(false)
57