mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 09:21:52 +00:00
add basic test on issue #183
This commit is contained in:
parent
61febfb589
commit
0945749e7c
27
tests/issue_183_basic.phpt
Normal file
27
tests/issue_183_basic.phpt
Normal file
@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Test V8::executeString() : Method access on derived classes
|
||||
--SKIPIF--
|
||||
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Foo extends \V8Js
|
||||
{
|
||||
public function hello()
|
||||
{
|
||||
print("Hello World\n");
|
||||
}
|
||||
}
|
||||
|
||||
$JS = <<< EOT
|
||||
PHP.hello();
|
||||
EOT;
|
||||
|
||||
$v8 = new Foo();
|
||||
$v8->executeString($JS);
|
||||
|
||||
?>
|
||||
===EOF===
|
||||
--EXPECT--
|
||||
Hello World
|
||||
===EOF===
|
Loading…
Reference in New Issue
Block a user