1--TEST--
2DOMText::appendData basic functionality test
3--CREDITS--
4Mike 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');
21echo "Text Length (one append): " . $textnode->length . "\n";
22
23$textnode->appendData('><&"');
24echo "Text Length (two appends): " . $textnode->length . "\n";
25
26echo "Text Content: " . $textnode->data . "\n";
27
28echo "\n" . $document->saveXML();
29
30?>
31--EXPECT--
32Text Length (one append): 4
33Text Length (two appends): 8
34Text Content: data><&"
35
36<?xml version="1.0"?>
37<root><text>data&gt;&lt;&amp;"</text></root>
38
39