php-src/ext/dom/tests/DOMText_appendData_basic.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

39 lines
871 B
PHP

--TEST--
DOMText::appendData basic functionality test
--CREDITS--
Mike Sullivan <mike@regexia.com>
#TestFest 2008 (London)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$document = new DOMDocument;
$root = $document->createElement('root');
$document->appendChild($root);
$text = $document->createElement('text');
$root->appendChild($text);
$textnode = $document->createTextNode('');
$text->appendChild($textnode);
$textnode->appendData('data');
echo "Text Length (one append): " . $textnode->length . "\n";
$textnode->appendData('><&"');
echo "Text Length (two appends): " . $textnode->length . "\n";
echo "Text Content: " . $textnode->data . "\n";
echo "\n" . $document->saveXML();
?>
--EXPECT--
Text Length (one append): 4
Text Length (two appends): 8
Text Content: data><&"
<?xml version="1.0"?>
<root><text>data&gt;&lt;&amp;"</text></root>