From: Christian Stocker Date: Thu, 30 Oct 2003 10:06:00 +0000 (+0000) Subject: make test work with libxml2 2.6.x and lower X-Git-Tag: php-5.0.0b2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=038a7c4831df457f74a5b79441a036ecf0ab8516;p=php 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) --- diff --git a/ext/dom/tests/dom005.phpt b/ext/dom/tests/dom005.phpt index 9ce32b4a19..ff8a79a5ff 100644 --- a/ext/dom/tests/dom005.phpt +++ b/ext/dom/tests/dom005.phpt @@ -8,20 +8,25 @@ $dom = new domdocument; $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 - + Hello world

This is a not well-formed
html files with undeclared entities 

--- save as HTML - + Hello world