blob: 21fc3454cdd8b1a3191a2ce104fbd972368af980 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
--TEST--
Bug #41374 (wholetext concats values of wrong nodes)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$xml = (binary)<<<EOXML
<?xml version="1.0" encoding="ISO-8859-1" ?>
<root>foo<child />baz</root>
EOXML;
$doc = new DOMDocument();
$doc->loadXML($xml);
$root = $doc->documentElement;
$foo = $root->firstChild;
var_dump($foo->wholeText == "foo");
$bar = $root->insertBefore($doc->createTextNode("bar"), $foo->nextSibling);
var_dump($foo->wholeText == "foobar");
var_dump($foo->wholeText == $bar->wholeText);
$baz = $bar->nextSibling->nextSibling;
var_dump($baz->wholeText === $foo->wholeText);
?>
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(false)
|