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