diff options
Diffstat (limited to 'ext/dom/tests/DOMComment_construct_basic_001.phpt')
-rw-r--r-- | ext/dom/tests/DOMComment_construct_basic_001.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/dom/tests/DOMComment_construct_basic_001.phpt b/ext/dom/tests/DOMComment_construct_basic_001.phpt new file mode 100644 index 0000000..902f7bb --- /dev/null +++ b/ext/dom/tests/DOMComment_construct_basic_001.phpt @@ -0,0 +1,19 @@ +--TEST-- +DOMComment::__construct() with constructor called twice. +--CREDITS-- +Eric Lee Stewart <ericleestewart@gmail.com> +# TestFest Atlanta 2009-05-25 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$dom = new DOMDocument('1.0', 'UTF-8'); +$element = $dom->appendChild(new DOMElement('root')); +$comment = new DOMComment("This is the first comment."); +$comment->__construct("This is the second comment."); +$comment = $element->appendChild($comment); +print $dom->saveXML(); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<root><!--This is the second comment.--></root> |