File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
dom /
tests /
DOMText_appendData_basic.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:54 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
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();
?>
===DONE===
--EXPECT--
Text Length (one append): 4
Text Length (two appends): 8
Text Content: data><&"
<?xml version="1.0"?>
<root><text>data><&"</text></root>
===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>