php-src/ext/simplexml/tests/SimpleXMLElement_addAttribute_required_attribute_name.phpt
Max Semenik 7f2f0c007c Migrate skip checks to --EXTENSIONS--, p4
For rationale, see #6787

Extensions migrated in part 4:
* simplexml
* skeleton
* soap
* spl
* sqlite3
* sysvmsg
* sysvsem
* tidy - also removed a check for an ancient dependency version
2021-04-08 10:36:44 +02:00

23 lines
549 B
PHP

--TEST--
SimpleXMLElement: Test to ensure that the required attribute name correctly is giving a warning
--CREDITS--
Havard Eide <nucleuz@gmail.com>
#PHPTestFest2009 Norway 2009-06-09 \o/
--EXTENSIONS--
simplexml
--FILE--
<?php
$a = new SimpleXMLElement("<php>testfest</php>");
try {
$a->addAttribute( "", "" );
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
echo $a->asXML();
?>
--EXPECT--
SimpleXMLElement::addAttribute(): Argument #1 ($qualifiedName) cannot be empty
<?xml version="1.0"?>
<php>testfest</php>