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

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

This commit is contained in:
Stefan Siegl 2016-01-09 19:15:12 +01:00
parent d438624a3d
commit 4a8a8b812f
2 changed files with 38 additions and 0 deletions

19
tests/issue_183_005.phpt Normal file
View File

@ -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
tests/issue_183_006.phpt Normal file
View File

@ -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