php-src/ext/dom/tests/bug44648.phpt
Steph Fox 4be7f4aecd - killed off UEXPECT
- com_dotnet gets a .cvsignore
- Ulf will take care of mysql extensions, rest complete
2008-05-27 18:16:04 +00:00

46 lines
834 B
PHP

--TEST--
Bug #44648 (Attribute names not checked for wellformedness)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$doc = new DOMDocument();
$doc->loadXML('<root/>');
$root = $doc->documentElement;
try {
$attr = new DOMAttr('@acb', '123');
$root->setAttributeNode($attr);
} catch (DOMException $e) {
echo $e->getMessage()."\n";
}
try {
$root->setAttribute('@def', '456');
} catch (DOMException $e) {
echo $e->getMessage()."\n";
}
try {
$root->setAttributeNS(NULL, '@ghi', '789');
} catch (DOMException $e) {
echo $e->getMessage()."\n";
}
try {
$root->setAttributeNS('urn::test', 'a:g@hi', '789');
} catch (DOMException $e) {
echo $e->getMessage()."\n";
}
echo $doc->saveXML($root);
?>
--EXPECT--
Invalid Character Error
Invalid Character Error
Invalid Character Error
Namespace Error
<root/>