Annotation of embedaddon/php/ext/dom/tests/dom005.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test 5: HTML Test
3: --SKIPIF--
4: <?php require_once('skipif.inc'); ?>
5: --FILE--
6: <?php
7: $dom = new domdocument;
8: $dom->loadHTMLFile(dirname(__FILE__)."/test.html");
9: print "--- save as XML\n";
10:
11: print adjustDoctype($dom->saveXML());
12: print "--- save as HTML\n";
13:
14: print adjustDoctype($dom->saveHTML());
15:
16: function adjustDoctype($xml) {
17: return str_replace(array("DOCTYPE HTML",'<p>','</p>'),array("DOCTYPE html",'',''),$xml);
18: }
19:
20: --EXPECT--
21: --- save as XML
22: <?xml version="1.0" standalone="yes"?>
23: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
24: <html><head><title>Hello world</title></head><body>
25: This is a not well-formed<br/>
26: html files with undeclared entities 
27: </body></html>
28: --- save as HTML
29: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
30: <html><head><title>Hello world</title></head><body>
31: This is a not well-formed<br>
32: html files with undeclared entities
33: </body></html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>