DefaultConfigTest::testDisallowsFunctions PHP Method

testDisallowsFunctions() public method

Test whether sandbox disallows functions
    public function testDisallowsFunctions()
    {
        $this->expectException('PHPSandbox\\Error');
        $this->sandbox->execute(function () {
            function test()
            {
                return 'Hello World!';
            }
            return test();
        });
    }