xref: /PHP-5.6/ext/dom/tests/bug37456.phpt (revision 1bc2880c)
1--TEST--
2Bug #37456 (DOMElement->setAttribute() loops forever)
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7
8$doc = new DOMDocument();
9$doc->resolveExternals = true;
10$doc->load(dirname(__FILE__)."/dom.xml");
11
12$root = $doc->getElementsByTagName('foo')->item(0);
13$root->setAttribute('bar', '&gt;');
14$attr = $root->setAttribute('bar', 'newval');
15print $attr->nodeValue;
16
17
18?>
19--EXPECT--
20
21newval
22
23