summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-10-12 16:02:36 +0200
committerRemi Collet <remi@php.net>2023-10-12 16:02:36 +0200
commit57c7f2db6af126ffe69ed3fd2c418dada22e351b (patch)
tree6338913f05422b6b8016b4989a2f8a8c08d6dc0a
parent5c46ad0677ddc2c4462191aa5a2ac7d129413997 (diff)
test file_exists, is_file, is_dirv1.0.0
-rw-r--r--tests/014-stream.phpt8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/014-stream.phpt b/tests/014-stream.phpt
index 6651a8c..d10b421 100644
--- a/tests/014-stream.phpt
+++ b/tests/014-stream.phpt
@@ -16,8 +16,10 @@ var_dump(in_array('rpm', stream_get_wrappers()));
echo "+ stat\n";
$s = stat($d); // S_ISDIR
var_dump($s['size'], $s['mode'] , $s['mode'] & 0040000 ? "OK" : "KO");
+var_dump(file_exists($d), is_dir($d), is_file($d));
$s = stat($n); // S_ISREG
var_dump($s['size'], $s['mode'] , $s['mode'] & 0100000 ? "OK" : "KO");
+var_dump(file_exists($n), is_dir($n), is_file($n));
echo "+ file\n";
var_dump($f = fopen($n, "r"));
@@ -42,9 +44,15 @@ bool(true)
int(0)
int(16877)
string(2) "OK"
+bool(true)
+bool(true)
+bool(false)
int(29)
int(33188)
string(2) "OK"
+bool(true)
+bool(false)
+bool(true)
+ file
resource(%d) of type (stream)
int(29)