summaryrefslogtreecommitdiff
path: root/ext/dom/tests/DOMCharacterData_data_basic_002.phpt
diff options
context:
space:
mode:
authorZoe Slattery <zoe@php.net>2009-08-26 17:17:58 (GMT)
committerZoe Slattery <zoe@php.net>2009-08-26 17:17:58 (GMT)
commit7effcd5f6c1cc2b1851bd0d5ef1ee06d89ba438a (patch)
tree036937e1cdb922ef28574653165cf8969f3e9e7b /ext/dom/tests/DOMCharacterData_data_basic_002.phpt
parent1a372313ca8e106b3816053ca9869282be01b6d1 (diff)
downloadphp-7effcd5f6c1cc2b1851bd0d5ef1ee06d89ba438a.tar.gz
Test from 2009 testfest
Diffstat (limited to 'ext/dom/tests/DOMCharacterData_data_basic_002.phpt')
-rw-r--r--ext/dom/tests/DOMCharacterData_data_basic_002.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/dom/tests/DOMCharacterData_data_basic_002.phpt b/ext/dom/tests/DOMCharacterData_data_basic_002.phpt
new file mode 100644
index 0000000..394b316
--- /dev/null
+++ b/ext/dom/tests/DOMCharacterData_data_basic_002.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Create CDATA section and change it using DOMcreateCDATASection
+--CREDITS--
+Nic Rosental nicrosental@gmail.com
+# TestFest Atlanta 2009-5-28
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$document = new DOMDocument;
+$root = $document->createElement('root');
+$document->appendChild($root);
+
+$cdata = $document->createCDATASection('t');
+$root->appendChild($cdata);
+print $document->saveXML()."\n";
+
+$cdata->data = 100;
+print $document->saveXML()."\n";
+
+?>
+--EXPECT--
+<?xml version="1.0"?>
+<root><![CDATA[t]]></root>
+
+<?xml version="1.0"?>
+<root><![CDATA[100]]></root>