--TEST-- The callback given to set_rejection_handler() should be invoked for outer unhandled rejection but should use default rejection handler for unhandled rejection --INI-- # suppress legacy PHPUnit 7 warning for Xdebug 3 xdebug.default_enable= --FILE-- getMessage() . PHP_EOL; }); reject(new RuntimeException('foo')); echo 'done' . PHP_EOL; ?> --EXPECTF-- Unhandled promise rejection with UnexpectedValueException: bar in %s:%d Stack trace: #0 %A{main} Unhandled RuntimeException: foo done