/**
* Test whether sandbox custom validation error handler intercepts validation Errors
*/
public function testCustomValidationErrorHandler()
{
$this->expectException('PHPSandbox\\Error');
$this->sandbox->setValidationErrorHandler(function ($error) {
throw $error;
});
$this->sandbox->execute(function () {
test2();
});
}