/**
* Test whether sandbox custom exception handler intercepts exceptions
*/
public function testCustomExceptionHandler()
{
$this->expectException('Exception');
$this->sandbox->whitelistType('Exception');
$this->sandbox->setExceptionHandler(function ($exception) {
throw $exception;
});
$this->sandbox->execute(function () {
throw new \Exception();
});
}