chregu          Thu Oct 30 05:06:01 2003 EDT

  Modified files:              
    /php-src/ext/dom/tests      dom005.phpt 
  Log:
  make test work with libxml2 2.6.x and lower
  (I used lowercase html again in the EXPECT part, as this is now the default 
  behaviour for newer libxml2 releases)
  
  
Index: php-src/ext/dom/tests/dom005.phpt
diff -u php-src/ext/dom/tests/dom005.phpt:1.2 php-src/ext/dom/tests/dom005.phpt:1.3
--- php-src/ext/dom/tests/dom005.phpt:1.2       Wed Oct 29 00:04:40 2003
+++ php-src/ext/dom/tests/dom005.phpt   Thu Oct 30 05:06:00 2003
@@ -8,20 +8,25 @@
 $dom->loadHTMLFile(dirname(__FILE__)."/test.html");
 print  "--- save as XML\n";
 
-print $dom->saveXML();
+print adjustDoctype($dom->saveXML());
 print  "--- save as HTML\n";
 
-print $dom->saveHTML();
+print adjustDoctype($dom->saveHTML());
+
+function adjustDoctype($xml) {
+    return str_replace("DOCTYPE HTML","DOCTYPE html",$xml);
+}
+
 --EXPECT--
 --- save as XML
 <?xml version="1.0" standalone="yes"?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
"http://www.w3.org/TR/REC-html40/loose.dtd";>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
"http://www.w3.org/TR/REC-html40/loose.dtd";>
 <html><head><title>Hello world</title></head><body><p>
 This is a not well-formed<br/>
 html files with undeclared entities 
 </p></body></html>
 --- save as HTML
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
"http://www.w3.org/TR/REC-html40/loose.dtd";>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
"http://www.w3.org/TR/REC-html40/loose.dtd";>
 <html>
 <head><title>Hello world</title></head>
 <body><p>

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to