1--TEST--
2Manually call __construct() - CDATA section variation
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$cdata = new DOMCdataSection("my value");
9var_dump($cdata->nodeValue);
10$cdata->__construct("my new value");
11var_dump($cdata->nodeValue);
12
13$doc = new DOMDocument();
14$doc->loadXML(<<<XML
15<?xml version="1.0"?>
16<container/>
17XML);
18$doc->documentElement->appendChild($cdata);
19echo $doc->saveXML();
20
21$cdata->__construct("my even newer value");
22$doc->documentElement->appendChild($cdata);
23echo $doc->saveXML();
24
25?>
26--EXPECT--
27string(8) "my value"
28string(12) "my new value"
29<?xml version="1.0"?>
30<container><![CDATA[my new value]]></container>
31<?xml version="1.0"?>
32<container><![CDATA[my new value]]><![CDATA[my even newer value]]></container>
33