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