Skip to content

Commit 76ec692

Browse files
committed
Updated test. touch() emits E_WARNING for bogus values. Updated 5.3 test to look the same.
1 parent 708017d commit 76ec692

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

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

+17-5
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);
@@ -71,6 +77,12 @@ echo "Done";
7177
*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***
7278

7379
*** testing touch ***
80+
81+
Warning: touch(): Unable to create file because No such file or directory in %s on line %d
82+
83+
Warning: touch(): Unable to create file because No such file or directory in %s on line %d
84+
85+
Warning: touch(): Unable to create file because No such file or directory in %s on line %d
7486
bool(false)
7587
bool(false)
7688
bool(false)

0 commit comments

Comments
 (0)