/** * Test whether sandbox converts errors to exceptions */ public function testConvertErrors() { $this->setExpectedException('ErrorException'); $this->sandbox->convert_errors = true; $this->sandbox->set_exception_handler(function ($error) { throw $error; }); $this->sandbox->execute(function () { $a[1]; }); }