diff options
Diffstat (limited to 'ext/standard/tests/file/is_readable_variation1.phpt')
-rw-r--r-- | ext/standard/tests/file/is_readable_variation1.phpt | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/ext/standard/tests/file/is_readable_variation1.phpt b/ext/standard/tests/file/is_readable_variation1.phpt index 60729b5ac2..e4347b04a8 100644 --- a/ext/standard/tests/file/is_readable_variation1.phpt +++ b/ext/standard/tests/file/is_readable_variation1.phpt @@ -6,10 +6,6 @@ require __DIR__ . '/../skipif_root.inc'; ?> --FILE-- <?php -/* Prototype: bool is_readable ( string $filename ); - Description: Tells whether the filename is readable. -*/ - /* test is_readable() with file having different filepath notation */ require __DIR__.'/file.inc'; @@ -50,7 +46,11 @@ $counter = 1; is a writable file */ foreach($files_arr as $file) { echo "-- Iteration $counter --\n"; - var_dump( is_readable($file) ); + try { + var_dump( is_readable($file) ); + } catch (TypeError $e) { + echo $e->getMessage(), "\n"; + } $counter++; clearstatcache(); } @@ -77,17 +77,11 @@ bool(false) -- Iteration 6 -- bool(false) -- Iteration 7 -- - -Warning: is_readable() expects parameter 1 to be a valid path, string given in %s on line %d -NULL +is_readable(): Argument #1 ($filename) must be a valid path, string given -- Iteration 8 -- - -Warning: is_readable() expects parameter 1 to be a valid path, string given in %s on line %d -NULL +is_readable(): Argument #1 ($filename) must be a valid path, string given -- Iteration 9 -- - -Warning: is_readable() expects parameter 1 to be a valid path, string given in %s on line %d -NULL +is_readable(): Argument #1 ($filename) must be a valid path, string given -- Iteration 10 -- bool(true) -- Iteration 11 -- |