Skip to content

Commit b7ec53f

Browse files
committed
Remove duplicate test conditions
1 parent 4a5b41f commit b7ec53f

File tree

1 file changed

+14
-29
lines changed

1 file changed

+14
-29
lines changed

ext/standard/tests/file/readlink_realpath_variation3.phpt

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,34 @@ Test readlink() and realpath() functions: usage variation - invalid args
44
<?php
55
echo "*** Testing readlink() and realpath() : usage variations ***\n";
66

7-
echo "\n*** Testing readlink() and realpath() with linkname as empty string, NULL and single space ***\n";
8-
$link_string = array (
9-
/* linkname as spaces */
10-
" ",
11-
' ',
7+
echo "\n*** Testing readlink() and realpath() with link name as empty string, NULL and single space ***\n";
128

13-
/* empty linkname */
14-
"",
15-
'',
16-
);
17-
for($loop_counter = 0; $loop_counter < count($link_string); $loop_counter++) {
18-
echo "-- Iteration";
19-
echo $loop_counter + 1;
20-
echo " --\n";
9+
echo 'readlink with link as spaces', PHP_EOL;
10+
var_dump(readlink(' '));
11+
echo 'realpath with link as spaces', PHP_EOL;
12+
var_dump(realpath(' '));
2113

22-
var_dump( readlink($link_string[$loop_counter]) );
23-
var_dump( realpath($link_string[$loop_counter]) );
24-
}
14+
echo 'readlink with link as empty string', PHP_EOL;
15+
var_dump(readlink(''));
16+
echo 'realpath with link as empty string', PHP_EOL;
17+
var_dump(realpath(''));
2518

2619
echo "Done\n";
2720
?>
2821
--EXPECTF--
2922
*** Testing readlink() and realpath() : usage variations ***
3023

31-
*** Testing readlink() and realpath() with linkname as empty string, NULL and single space ***
32-
-- Iteration1 --
24+
*** Testing readlink() and realpath() with link name as empty string, NULL and single space ***
25+
readlink with link as spaces
3326

3427
Warning: readlink(): %s in %s on line %d
3528
bool(false)
36-
%s
37-
-- Iteration2 --
38-
39-
Warning: readlink(): %s in %s on line %d
40-
bool(false)
41-
%s
42-
-- Iteration3 --
43-
44-
Warning: readlink(): %s in %s on line %d
29+
realpath with link as spaces
4530
bool(false)
46-
string(%d) "%s"
47-
-- Iteration4 --
31+
readlink with link as empty string
4832

4933
Warning: readlink(): %s in %s on line %d
5034
bool(false)
35+
realpath with link as empty string
5136
string(%d) "%s"
5237
Done

0 commit comments

Comments
 (0)