]> granicus.if.org Git - php/commitdiff
update tests
authorRob Richards <rrichards@php.net>
Sat, 5 Aug 2006 12:35:35 +0000 (12:35 +0000)
committerRob Richards <rrichards@php.net>
Sat, 5 Aug 2006 12:35:35 +0000 (12:35 +0000)
use binary strings for loadXML() method

ext/dom/tests/bug34276.phpt
ext/dom/tests/bug35342.phpt
ext/dom/tests/bug36756.phpt
ext/dom/tests/bug37277.phpt
ext/dom/tests/canonicalization.phpt
ext/dom/tests/dom002.phpt
ext/dom/tests/dom007.phpt
ext/dom/tests/dom_set_attr_node.phpt
ext/dom/tests/dom_test.inc

index fac4b85e7f47f8d33727c0a63445b8dc8c294a74..2ffc061cd6d53c050862c04ca4cdb35dfaa46e6a 100644 (file)
@@ -4,7 +4,7 @@ Bug # 34276: setAttributeNS and default namespace
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-$xml = <<<HERE
+$xml = b<<<HERE
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <foo xmlns="http://www.example.com/ns/foo"
      xmlns:fubar="http://www.example.com/ns/fubar" attra="attra" />
index c07fd340dcdd0e5aa5348cd2e46e76ebf776ed7f..b32a3eb3755ea7c28e7d3a50541894a5c80f6848 100644 (file)
@@ -5,7 +5,7 @@ Bug # 35342: isset(DOMNodeList->length) returns false
 --FILE--
 <?php
 $dom = new DOMDocument();
-$dom->loadXML("<root><foo>foobar</foo><foo>foobar#2</foo></root>");
+$dom->loadXML(b"<root><foo>foobar</foo><foo>foobar#2</foo></root>");
 
 $nodelist = $dom->getElementsByTagName("foo");
 
index e24f9f0804a906670ed506881c4f8dfa06f7317a..c7423fccd3aa2744d92448e794a53a3265379f7b 100644 (file)
@@ -7,7 +7,7 @@ Bug #36756: (DOMDocument::removeChild corrupts node)
 
 /* Node is preserved from removeChild */
 $dom = new DOMDocument();
-$dom->loadXML('<root><child/></root>');
+$dom->loadXML(b'<root><child/></root>');
 $xpath = new DOMXpath($dom);
 $node = $xpath->query('/root')->item(0);
 echo $node->nodeName . "\n";
@@ -15,7 +15,7 @@ $dom->removeChild($GLOBALS['dom']->firstChild);
 echo "nodeType: " . $node->nodeType . "\n";
 
 /* Node gets destroyed during removeChild */
-$dom->loadXML('<root><child/></root>');
+$dom->loadXML(b'<root><child/></root>');
 $xpath = new DOMXpath($dom);
 $node = $xpath->query('//child')->item(0);
 echo $node->nodeName . "\n";
index 4a01684171e58039055fddde6cf893216e1a9bb6..4c3b907196ab6f4e893da4b55cb30054c2aa743c 100644 (file)
@@ -6,7 +6,7 @@ Bug # 37277 (cloning Dom Documents or Nodes does not work)
 <?php
 $dom1 = new DomDocument('1.0', 'UTF-8');
 
-$xml = '<foo />';
+$xml = b'<foo />';
 $dom1->loadXml($xml);
 
 $node = clone $dom1->documentElement;
index cf1a81f24a95c180ae14220759d7e6e7bef1178d..b550d01c893582fbbac690051f05a293f69d9121 100644 (file)
@@ -4,7 +4,7 @@ Test: Canonicalization - C14N()
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-$xml = <<<EOXML
+$xml = b<<<EOXML
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <foo xmlns="http://www.example.com/ns/foo"
      xmlns:fubar="http://www.example.com/ns/fubar" xmlns:test="urn::test"><contain>
index 92c1a277d4b4ad3d5ce4554a0d18a34c96c5fc6e..3c6819ce0371ee5e285a02fc6c81a94c2ec45e05 100644 (file)
@@ -4,7 +4,7 @@ Test 2: getElementsByTagName() / getElementsByTagNameNS()
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-$xml = <<<HERE
+$xml = b<<<HERE
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <foo xmlns="http://www.example.com/ns/foo"
      xmlns:fubar="http://www.example.com/ns/fubar">
index 649d6303363783ca15b49ac67a735c37ad7c0768..8966ca49520e371c1d9e4ff1b1e11db975ad2d85 100644 (file)
@@ -6,7 +6,7 @@ require_once('skipif.inc');
 ?>
 --FILE--
 <?php
-$xml = <<< EOXML
+$xml = b<<< EOXML
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!DOCTYPE courses [
 <!ELEMENT courses (course+)>
index 888ad0ea77b8af2eefd3d319da6297f373ff06eb..0d24892ea44b0a55fcf999e5b7b6e2d6a315c2ef 100644 (file)
@@ -5,12 +5,12 @@ Test: setAttributeNode()
 --FILE--
 <?php
 
-$xml = <<<HERE
+$xml = b<<<HERE
 <?xml version="1.0" ?>
 <root a="b" />
 HERE;
 
-$xml2 = <<<HERE
+$xml2 = b<<<HERE
 <?xml version="1.0" ?>
 <doc2 />
 HERE;
index 86b426f8f37ca6fd6b6f57076f6ebb75ef94f6f0..e626de686b8bd1aba94f4b506004828aeb2f51bf 100644 (file)
@@ -1,5 +1,5 @@
 <?PHP
-$xmlstr = "<?xml version='1.0' standalone='yes'?>
+$xmlstr = b"<?xml version='1.0' standalone='yes'?>
 <!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'
 [ <!ENTITY sp \"spanish\">
 ]>