mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-23 00:51:51 +00:00
67269ddfc4
V8 5.1 uses slightly changed SyntaxError messages. This adapts our tests as needed (for support of V8 5.1 as well as older versions)
25 lines
585 B
PHP
25 lines
585 B
PHP
--TEST--
|
|
Test V8::executeString() : Script validator test
|
|
--SKIPIF--
|
|
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$v8 = new V8Js();
|
|
var_dump($v8->checkString('print("Hello World!");'));
|
|
|
|
try {
|
|
var_dump($v8->checkString('print("Hello World!);'));
|
|
} catch (V8JsScriptException $e) {
|
|
var_dump($e->getMessage());
|
|
}
|
|
?>
|
|
===EOF===
|
|
--EXPECTF--
|
|
Deprecated: Function V8Js::checkString() is deprecated in %s on line %d
|
|
bool(true)
|
|
|
|
Deprecated: Function V8Js::checkString() is deprecated in %s on line %d
|
|
string(%d) "V8Js::checkString():1: SyntaxError: %s"
|
|
===EOF===
|