DefaultConfigTest::testCustomErrorHandler PHP Метод

testCustomErrorHandler() публичный Метод

Test whether sandbox custom error handler intercepts errors
    public function testCustomErrorHandler()
    {
        $this->expectException('Exception');
        $this->sandbox->setErrorHandler(function ($errno, $errstr) {
            throw new \Exception($errstr);
        });
        $this->sandbox->execute(function () {
            $a[1];
        });
    }