summaryrefslogtreecommitdiff
path: root/ext/dom/tests/DOMEntityReference_error1.phpt
blob: eab04e43ea3844aea0537ea8aa069046f3615c85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--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