summaryrefslogtreecommitdiff
path: root/tests/output/stream_isatty_in-out.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/output/stream_isatty_in-out.phpt')
-rw-r--r--tests/output/stream_isatty_in-out.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/output/stream_isatty_in-out.phpt b/tests/output/stream_isatty_in-out.phpt
new file mode 100644
index 0000000000..755ee82d18
--- /dev/null
+++ b/tests/output/stream_isatty_in-out.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Test stream_isatty with redirected STDIN/STDOUT
+--CAPTURE_STDIO--
+STDIN STDOUT
+--FILE--
+<?php
+require dirname(__FILE__).'/stream_isatty.inc';
+testToStdOut();
+?>
+--EXPECTF--
+STDIN (constant): bool(false)
+STDIN (fopen): bool(false)
+STDIN (php://fd/0): bool(false)
+STDOUT (constant): bool(false)
+STDOUT (fopen): bool(false)
+STDOUT (php://fd/1): bool(false)
+STDERR (constant): bool(true)
+STDERR (fopen): bool(true)
+STDERR (php://fd/2): bool(true)
+Not a stream:
+Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp): bool(false)
+Invalid stream (php://input): bool(false)
+Invalid stream (php://memory): bool(false)
+File stream: bool(false)