Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit 23c676c

Browse files
committed
Add tests for recursive tempalte set (XFAIL, skip)
1 parent 304e595 commit 23c676c

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
v8\ObjectTemplate
3+
--SKIPIF--
4+
<?php if (!extension_loaded("v8")) print "skip"; ?>
5+
<?php print "skip this test is known to fail and it hangs on travis"; ?>
6+
--FILE--
7+
<?php
8+
/** @var \Phpv8Testsuite $helper */
9+
$helper = require '.testsuite.php';
10+
11+
require '.v8-helpers.php';
12+
$v8_helper = new PhpV8Helpers($helper);
13+
14+
// Tests:
15+
16+
$isolate = new \v8\Isolate();
17+
18+
$template = new \v8\ObjectTemplate($isolate);
19+
$template->Set(new \v8\StringValue($isolate, 'self'), $template);
20+
21+
$context = new \v8\Context($isolate);
22+
$context->GlobalObject()->Set($context, new \v8\StringValue($isolate, 'test'), $template->NewInstance($context));
23+
24+
?>
25+
--XFAIL--
26+
Recursive templates are known to segfault
27+
--EXPECT--
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
v8\ObjectTemplate
3+
--SKIPIF--
4+
<?php if (!extension_loaded("v8")) print "skip"; ?>
5+
<?php print "skip this test is known to fail and it hangs on travis"; ?>
6+
--FILE--
7+
<?php
8+
/** @var \Phpv8Testsuite $helper */
9+
$helper = require '.testsuite.php';
10+
11+
require '.v8-helpers.php';
12+
$v8_helper = new PhpV8Helpers($helper);
13+
14+
// Tests:
15+
16+
$isolate = new \v8\Isolate();
17+
18+
$template = new \v8\ObjectTemplate($isolate);
19+
$template->Set(new \v8\StringValue($isolate, 'self'), $template);
20+
21+
$context = new \v8\Context($isolate, [], $template);
22+
23+
24+
?>
25+
--XFAIL--
26+
Recursive templates are known to segfault
27+
--EXPECT--

0 commit comments

Comments
 (0)