mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 08:11:52 +00:00
Add test that V8Js::__sleep and V8Js::__wakeup are final
This commit is contained in:
parent
d438624a3d
commit
4a8a8b812f
19
tests/issue_183_005.phpt
Normal file
19
tests/issue_183_005.phpt
Normal 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
19
tests/issue_183_006.phpt
Normal 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
|
Loading…
Reference in New Issue
Block a user