1--TEST--
2SimpleXMLElement: Test to ensure that the required attribute name correctly is giving a warning
3--CREDITS--
4Havard Eide <nucleuz@gmail.com>
5#PHPTestFest2009 Norway 2009-06-09 \o/
6--EXTENSIONS--
7simplexml
8--FILE--
9<?php
10$a = new SimpleXMLElement("<php>testfest</php>");
11
12try {
13    $a->addAttribute( "", "" );
14} catch (ValueError $exception) {
15    echo $exception->getMessage() . "\n";
16}
17
18echo $a->asXML();
19?>
20--EXPECT--
21SimpleXMLElement::addAttribute(): Argument #1 ($qualifiedName) cannot be empty
22<?xml version="1.0"?>
23<php>testfest</php>
24