add missing test
authorMichael Wallner <mike@php.net>
Wed, 20 Jan 2016 15:10:46 +0000 (16:10 +0100)
committerMichael Wallner <mike@php.net>
Wed, 20 Jan 2016 15:10:46 +0000 (16:10 +0100)
tests/stdio/fopen001.phpt [new file with mode: 0644]

diff --git a/tests/stdio/fopen001.phpt b/tests/stdio/fopen001.phpt
new file mode 100644 (file)
index 0000000..732abdb
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+fopen
+--SKIPIF--
+<?php
+extension_loaded("psi") or die("skip - need ext/psi");
+?>
+--INI--
+psi.directory={PWD}/../../psi.d:{PWD}
+--FILE--
+===TEST===
+<?php
+$stream = psi\fopen(__FILE__, "r");
+var_dump(filesize(__FILE__) === psi\fread($stream, $data));
+var_dump(file_get_contents(__FILE__) === $data);
+var_dump(psi\fclose($stream));
+?>
+===DONE===
+--EXPECTF--
+===TEST===
+bool(true)
+bool(true)
+int(0)
+===DONE===