DefaultConfigTest::testConvertErrors PHP Method

testConvertErrors() public method

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