1--TEST--
2Node renaming validation errors
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\XMLDocument::createFromString('<root/>');
9
10try {
11    $dom->documentElement->rename('', 'a:b');
12} catch (DOMException $e) {
13    echo $e->getMessage(), "\n";
14}
15
16try {
17    $dom->documentElement->rename('urn:a', 'a:b:c');
18} catch (DOMException $e) {
19    echo $e->getMessage(), "\n";
20}
21
22echo $dom->saveXML();
23
24?>
25--EXPECT--
26Namespace Error
27Invalid Character Error
28<?xml version="1.0" encoding="UTF-8"?>
29<root/>
30