stream_isatty_err.phpt 798 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. Test stream_isatty with redirected STDERR
  3. --SKIPIF--
  4. <?php
  5. if (getenv("SKIP_IO_CAPTURE_TESTS")) {
  6. die("skip I/O capture test");
  7. }
  8. ?>
  9. --CAPTURE_STDIO--
  10. STDERR
  11. --FILE--
  12. <?php
  13. require dirname(__FILE__).'/stream_isatty.inc';
  14. testToStdErr();
  15. ?>
  16. --EXPECTF--
  17. STDIN (constant): bool(true)
  18. STDIN (fopen): bool(true)
  19. STDIN (php://fd/0): bool(true)
  20. STDOUT (constant): bool(true)
  21. STDOUT (fopen): bool(true)
  22. STDOUT (php://fd/1): bool(true)
  23. STDERR (constant): bool(false)
  24. STDERR (fopen): bool(false)
  25. STDERR (php://fd/2): bool(false)
  26. Not a stream:
  27. Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
  28. bool(false)
  29. Invalid stream (php://temp): bool(false)
  30. Invalid stream (php://input): bool(false)
  31. Invalid stream (php://memory): bool(false)
  32. File stream: bool(false)