FunctionRejectTestShouldReportUnhandled.phpt 401 B

12345678910111213141516171819
  1. --TEST--
  2. Calling reject() without any handlers should report unhandled rejection
  3. --INI--
  4. # suppress legacy PHPUnit 7 warning for Xdebug 3
  5. xdebug.default_enable=
  6. --FILE--
  7. <?php
  8. use function React\Promise\reject;
  9. require __DIR__ . '/../vendor/autoload.php';
  10. reject(new RuntimeException('foo'));
  11. ?>
  12. --EXPECTF--
  13. Unhandled promise rejection with RuntimeException: foo in %s:%d
  14. Stack trace:
  15. #0 %A{main}