From 09c9929fddd3e96b65a1faf20632ceb13c23c736 Mon Sep 17 00:00:00 2001 From: Toon Schoenmakers Date: Mon, 11 Apr 2016 13:30:26 +0200 Subject: [PATCH] Added slightly better test case --- tests/test1.php | 2 +- tests/test2.php | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/test2.php 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