Skip to content

Commit

Permalink
Added slightly better test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Toon Schoenmakers committed Apr 11, 2016
1 parent 997df41 commit 09c9929
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test1.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down
13 changes: 13 additions & 0 deletions tests/test2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

$context = new JS\Context();

$context->assign("alert", function($output) {

echo ($output.PHP_EOL);

});

var_dump($context->evaluate("3 + 2;"));

$context->evaluate('alert("TEST");');

0 comments on commit 09c9929

Please sign in to comment.