mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Add a test for previously-uncovered error condition in C14N (#14283)
This commit is contained in:
16
ext/dom/tests/c14n_no_nodeset_returned.phpt
Normal file
16
ext/dom/tests/c14n_no_nodeset_returned.phpt
Normal file
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Not returning a node set for C14N
|
||||
--EXTENSIONS--
|
||||
dom
|
||||
--FILE--
|
||||
<?php
|
||||
$dom = new DOMDocument;
|
||||
$dom->loadXML('<root>test</root>');
|
||||
try {
|
||||
$dom->documentElement->C14N(true, false, ['query' => 'string(./root/text())']);
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
XPath query did not return a nodeset
|
||||
Reference in New Issue
Block a user