1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00
Files
archived-php-src/ext/dom/tests/DOMEntityReference_error1.phpt
2019-10-19 15:42:16 +02:00

17 lines
368 B
PHP

--TEST--
DOMEntityReference - DOM_INVALID_CHARACTER_ERR raised if name contains an invalid character
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
try {
new DOMEntityReference('!');
} catch (DOMException $e) {
var_dump($e->getCode() === DOM_INVALID_CHARACTER_ERR);
echo $e->getMessage();
}
?>
--EXPECT--
bool(true)
Invalid Character Error