Browse Source

Add test that V8Js::__sleep and V8Js::__wakeup are final

Stefan Siegl 9 years ago
parent
commit
4a8a8b812f
2 changed files with 38 additions and 0 deletions
  1. 19 0
      tests/issue_183_005.phpt
  2. 19 0
      tests/issue_183_006.phpt

+ 19 - 0
tests/issue_183_005.phpt

@@ -0,0 +1,19 @@
+--TEST--
+Test V8::executeString() : Method access on derived classes (__sleep)
+--SKIPIF--
+<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+--FILE--
+<?php
+
+class Foo extends \V8Js
+{
+    public function __sleep()
+    {
+	var_dump("foo");
+    }
+}
+
+?>
+===EOF===
+--EXPECTF--
+Fatal error: Cannot override final method V8Js::__sleep() in %s

+ 19 - 0
tests/issue_183_006.phpt

@@ -0,0 +1,19 @@
+--TEST--
+Test V8::executeString() : Method access on derived classes (__wakeup)
+--SKIPIF--
+<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+--FILE--
+<?php
+
+class Foo extends \V8Js
+{
+    public function __wakeup()
+    {
+	var_dump("foo");
+    }
+}
+
+?>
+===EOF===
+--EXPECTF--
+Fatal error: Cannot override final method V8Js::__wakeup() in %s