public function testBugCompileEmptyFunction() { Artifex::execute(<<<'EOF' #* function foo() #* end EOF ); $this->assertTrue(true); }
/** * @expectedException \RuntimeException */ public function testInvalidReplace() { $args = array('foo' => 'bar'); Artifex::execute("__args__", compact('args')); }
public function testDefineExecLocalFunction() { $namespace = safe_eval(Artifex::execute(<<<'EOF' #* foo("artifex", "rulz") #* function foo($foo, $method) class __foo__ { function __method__() { } } #* end EOF )); $this->assertTrue(class_exists($namespace . '\\artifex')); $this->assertTrue(is_callable($namespace . '\\artifex', 'rulz')); }