diff options
Diffstat (limited to 'ext/dom/tests/DOMNode_C14N_basic.phpt')
-rw-r--r-- | ext/dom/tests/DOMNode_C14N_basic.phpt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/dom/tests/DOMNode_C14N_basic.phpt b/ext/dom/tests/DOMNode_C14N_basic.phpt new file mode 100644 index 0000000..52a47a1 --- /dev/null +++ b/ext/dom/tests/DOMNode_C14N_basic.phpt @@ -0,0 +1,29 @@ +--TEST-- +DOMNode::C14N() +--SKIPIF-- +<?php +include('skipif.inc'); +?> +--FILE-- +<?php +$xml = <<< XML +<?xml version="1.0" ?> +<books> + <book> + <title>The Grapes of Wrath</title> + <author>John Steinbeck</author> + </book> + <book> + <title>The Pearl</title> + <author>John Steinbeck</author> + </book> +</books> +XML; + +$doc = new DOMDocument(); +$doc->loadXML($xml); +$node = $doc->getElementsByTagName('title')->item(0); +var_dump($node->C14N()); +?> +--EXPECTF-- +string(34) "<title>The Grapes of Wrath</title>" |