Sfoglia il codice sorgente

Test export of undeclared properties in derived classes

Stefan Siegl 11 anni fa
parent
commit
683ac347c7
1 ha cambiato i file con 26 aggiunte e 0 eliminazioni
  1. 26 0
      tests/derived_class_properties_extra.phpt

+ 26 - 0
tests/derived_class_properties_extra.phpt

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