diff --git a/tests/test1.php b/tests/test1.php index 47ab9e1..06ad21d 100644 --- a/tests/test1.php +++ b/tests/test1.php @@ -109,7 +109,7 @@ public function __invoke($params) $context->assign('create', function($x) { - throw new Exception("exception"); + //throw new Exception("exception"); return new MyClass($x); }); diff --git a/tests/test2.php b/tests/test2.php new file mode 100644 index 0000000..dfbe0dd --- /dev/null +++ b/tests/test2.php @@ -0,0 +1,13 @@ +assign("alert", function($output) { + + echo ($output.PHP_EOL); + +}); + +var_dump($context->evaluate("3 + 2;")); + +$context->evaluate('alert("TEST");'); \ No newline at end of file