0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 09:21:52 +00:00

Add test on initially initialized properties on V8Js object.

This commit is contained in:
Stefan Siegl 2013-10-19 02:15:37 +02:00
parent 645b0df999
commit 1f8b605585

View File

@ -0,0 +1,26 @@
--TEST--
Test V8::executeString() : Initialized properties on derived class
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
class V8Wrapper extends V8Js {
public $testing = 23;
protected $protectedVar = 42;
private $privateVar = 42;
}
$v8 = new V8Wrapper();
echo($v8->testing."\n");
$v8->executeString('print(PHP.testing + "\n");');
$v8->executeString('print(PHP.protectedVar + "\n");');
$v8->executeString('print(PHP.privateVar + "\n");');
?>
===EOF===
--EXPECT--
23
23
undefined
undefined
===EOF===