From e0f990bfa1ad7c2aa799cfecd88ad4c5813b678c Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Fri, 8 Jan 2016 15:47:24 +0100 Subject: [PATCH] Add test with private/protected methods, refs #183 --- tests/issue_183_001.phpt | 30 ++++++++++++++++++++++++++++++ tests/issue_183_002.phpt | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 tests/issue_183_001.phpt create mode 100644 tests/issue_183_002.phpt diff --git a/tests/issue_183_001.phpt b/tests/issue_183_001.phpt new file mode 100644 index 0000000..8469940 --- /dev/null +++ b/tests/issue_183_001.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test V8::executeString() : Method access on derived classes (protected) +--SKIPIF-- + +--FILE-- +executeString($JS); + +?> +===EOF=== +--EXPECTF-- +Fatal error: Uncaught exception 'V8JsScriptException' with message 'V8Js::compileString():1: TypeError: PHP.hello is not a function' in %s +Stack trace: +#0 %s: V8Js->executeString('PHP.hello();') +#1 {main} + thrown in %s on line 16 diff --git a/tests/issue_183_002.phpt b/tests/issue_183_002.phpt new file mode 100644 index 0000000..fa8704b --- /dev/null +++ b/tests/issue_183_002.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test V8::executeString() : Method access on derived classes (private) +--SKIPIF-- + +--FILE-- +executeString($JS); + +?> +===EOF=== +--EXPECTF-- +Fatal error: Uncaught exception 'V8JsScriptException' with message 'V8Js::compileString():1: TypeError: PHP.hello is not a function' in %s +Stack trace: +#0 %s: V8Js->executeString('PHP.hello();') +#1 {main} + thrown in %s on line 16