restore_exception_handler();
}
}
+
+ /**
+ * @expectedException \Exception
+ * @group no-hhvm
+ */
+ public function testCustomExceptionHandler()
+ {
+ $handler = new ErrorHandler();
+ $handler->setExceptionHandler(function ($e) use ($handler) {
+ $handler->handleException($e);
+ });
+
+ $handler->handleException(new \Exception());
+ }
}