Annotation of embedaddon/php/ext/dom/tests/DOMDocument_saveHTML_variant1.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: DOMDocument::saveHTML() optional parameters
! 3: --SKIPIF--
! 4: <?php
! 5: require_once dirname(__FILE__) .'/skipif.inc';
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9: $doc = new DOMDocument('1.0');
! 10: $root = $doc->createElement('html');
! 11: $root = $doc->appendChild($root);
! 12: $head = $doc->createElement('head');
! 13: $head = $root->appendChild($head);
! 14: $title = $doc->createElement('title');
! 15: $title = $head->appendChild($title);
! 16: $text = $doc->createTextNode('This is the title');
! 17: $text = $title->appendChild($text);
! 18: echo $doc->saveHTML(NULL), "\n";
! 19: echo $doc->saveHTML($title), "\n";
! 20: ?>
! 21: --EXPECTF--
! 22: <html><head><title>This is the title</title></head></html>
! 23:
! 24: <title>This is the title</title>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>