Skip to content

Commit b83d7bb

Browse files
author
Melvyn Sopacua
committed
(xslt tests) Test for reference to a non-existing scheme handler.
1 parent 1fbef62 commit b83d7bb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

ext/xslt/tests/004.phpt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Set a non-existing scheme handler
3+
--SKIPIF--
4+
<?php include("skipif.inc"); ?>
5+
--FILE--
6+
<?php
7+
function bar()
8+
{
9+
return 1;
10+
}
11+
$xh = xslt_create();
12+
$xmlstring = '<foo><barred /></foo>';
13+
$xslstring = '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/1999/XSL/Transform"><xsl:for-each select="/"><xsl:value-of select="document(\'bogus://foo\')" /></xsl:for-each></xsl:stylesheet>';
14+
xslt_set_scheme_handlers($xh, array('get_all' => 'foo'));
15+
$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' => $xmlstring, '/_xsl' => $xslstring));
16+
xslt_free($xh);
17+
echo("OK");
18+
?>
19+
--EXPECT--
20+
OK

0 commit comments

Comments
 (0)