Skip to content

Commit e2caad5

Browse files
committed
Updated test. touch() emits E_WARNING for bogus values. Updated 5.3 test to look the same.
1 parent 6814cbe commit e2caad5

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

ext/standard/tests/file/005_variation2.phpt

+16-10
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,17 @@ function stat_fn( $filename ) {
4949

5050
echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n";
5151
echo "\n*** testing touch ***\n";
52-
var_dump(touch(NULL));
53-
var_dump(touch(false));
54-
var_dump(touch(''));
55-
var_dump(touch(' '));
56-
var_dump(touch('|'));
52+
$a = touch(NULL);
53+
$b = touch(false);
54+
$c = touch('');
55+
$d = touch(' ');
56+
$e = touch('|');
57+
58+
var_dump($a);
59+
var_dump($b);
60+
var_dump($c);
61+
var_dump($d);
62+
var_dump($e);
5763

5864
echo "\n*** testing file info ***";
5965
stat_fn(NULL);
@@ -72,13 +78,13 @@ echo "Done";
7278

7379
*** testing touch ***
7480

75-
Warning: touch(): Unable to create file because %s in %s on line %d
76-
bool(false)
81+
Warning: touch(): Unable to create file because No such file or directory in %s on line %d
7782

78-
Warning: touch(): Unable to create file because %s in %s on line %d
79-
bool(false)
83+
Warning: touch(): Unable to create file because No such file or directory in %s on line %d
8084

81-
Warning: touch(): Unable to create file because %s in %s on line %d
85+
Warning: touch(): Unable to create file because No such file or directory in %s on line %d
86+
bool(false)
87+
bool(false)
8288
bool(false)
8389
bool(true)
8490
bool(true)

0 commit comments

Comments
 (0)