0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 18:41:52 +00:00
phpv8/tests/commonjs_fatal_error.phpt

18 lines
402 B
PHP

--TEST--
Test V8Js::setModuleLoader : Handle fatal errors gracefully
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
$v8 = new V8Js();
$v8->setModuleLoader(function() {
trigger_error('some fatal error', E_USER_ERROR);
});
$v8->executeString(' require("foo"); ');
?>
===EOF===
--EXPECTF--
Fatal error: some fatal error in %s%ecommonjs_fatal_error.php on line 5