FunctionRejectTestCancelShouldNotReportUnhandled.phpt 351 B

12345678910111213141516171819
  1. --TEST--
  2. Calling reject() and then cancel() should not 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'))->cancel();
  11. echo 'void' . PHP_EOL;
  12. ?>
  13. --EXPECT--
  14. void