From: Philip Olson Date: Tue, 24 May 2011 23:27:49 +0000 (+0000) Subject: Updated test. touch() emits E_WARNING for bogus values. Updated 5.3 test to look... X-Git-Tag: php-5.3.7RC1~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2caad5f968de959bb1213be247398b455225c43;p=php Updated test. touch() emits E_WARNING for bogus values. Updated 5.3 test to look the same. --- diff --git a/ext/standard/tests/file/005_variation2.phpt b/ext/standard/tests/file/005_variation2.phpt index d70ce1251e..d14a9bddd7 100644 --- a/ext/standard/tests/file/005_variation2.phpt +++ b/ext/standard/tests/file/005_variation2.phpt @@ -49,11 +49,17 @@ function stat_fn( $filename ) { echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; echo "\n*** testing touch ***\n"; -var_dump(touch(NULL)); -var_dump(touch(false)); -var_dump(touch('')); -var_dump(touch(' ')); -var_dump(touch('|')); +$a = touch(NULL); +$b = touch(false); +$c = touch(''); +$d = touch(' '); +$e = touch('|'); + +var_dump($a); +var_dump($b); +var_dump($c); +var_dump($d); +var_dump($e); echo "\n*** testing file info ***"; stat_fn(NULL); @@ -72,13 +78,13 @@ echo "Done"; *** testing touch *** -Warning: touch(): Unable to create file because %s in %s on line %d -bool(false) +Warning: touch(): Unable to create file because No such file or directory in %s on line %d -Warning: touch(): Unable to create file because %s in %s on line %d -bool(false) +Warning: touch(): Unable to create file because No such file or directory in %s on line %d -Warning: touch(): Unable to create file because %s in %s on line %d +Warning: touch(): Unable to create file because No such file or directory in %s on line %d +bool(false) +bool(false) bool(false) bool(true) bool(true)