public function test_fatal_error_from_fatal_error_handler_is_handled() { $handler = new ErrorHandler(); $fatalError = new FatalError(ErrorType::PARSE, 'foo', 'bar', 'baz'); $handler->addFatalErrorHandler(function (IError $error) { throw new Exception(); }); try { $handler->handleFatalError($fatalError); } catch (Exception $ex) { } ob_start(); }