user-stream-error.phpt 623 B

123456789101112131415161718192021
  1. --TEST--
  2. E_ERROR during UserStream Open
  3. --FILE--
  4. <?php
  5. class FailStream {
  6. public function stream_open($path, $mode, $options, &$opened_path) {
  7. _some_undefined_function();
  8. }
  9. }
  10. stream_wrapper_register('mystream', 'FailStream');
  11. fopen('mystream://foo', 'r');
  12. echo 'Done';
  13. ?>
  14. --EXPECTF--
  15. Fatal error: Uncaught Error: Call to undefined function _some_undefined_function() in %s%euser-stream-error.php:%d
  16. Stack trace:
  17. #0 [internal function]: FailStream->stream_open('mystream://foo', 'r', 0, NULL)
  18. #1 %s%euser-stream-error.php(%d): fopen('mystream://foo', 'r')
  19. #2 {main}
  20. thrown in %s%euser-stream-error.php on line %d