Annotation of embedaddon/php/ext/dom/tests/DOMText_appendData_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: DOMText::appendData basic functionality test
! 3: --CREDITS--
! 4: Mike Sullivan <mike@regexia.com>
! 5: #TestFest 2008 (London)
! 6: --SKIPIF--
! 7: <?php require_once('skipif.inc'); ?>
! 8: --FILE--
! 9: <?php
! 10:
! 11: $document = new DOMDocument;
! 12: $root = $document->createElement('root');
! 13: $document->appendChild($root);
! 14:
! 15: $text = $document->createElement('text');
! 16: $root->appendChild($text);
! 17:
! 18: $textnode = $document->createTextNode('');
! 19: $text->appendChild($textnode);
! 20: $textnode->appendData('data');
! 21: echo "Text Length (one append): " . $textnode->length . "\n";
! 22:
! 23: $textnode->appendData('><&"');
! 24: echo "Text Length (two appends): " . $textnode->length . "\n";
! 25:
! 26: echo "Text Content: " . $textnode->data . "\n";
! 27:
! 28: echo "\n" . $document->saveXML();
! 29:
! 30: ?>
! 31: ===DONE===
! 32: --EXPECT--
! 33: Text Length (one append): 4
! 34: Text Length (two appends): 8
! 35: Text Content: data><&"
! 36:
! 37: <?xml version="1.0"?>
! 38: <root><text>data><&"</text></root>
! 39: ===DONE===
! 40:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>