1
0
mirror of https://github.com/php/php-src.git synced 2026-04-05 15:12:39 +02:00

Merge branch 'PHP-7.4'

This commit is contained in:
Fabien Villepinte
2019-10-19 15:44:57 +02:00
3 changed files with 29 additions and 0 deletions

View File

@@ -9,8 +9,10 @@ $objDoc = new DomDocument();
try {
$objDoc->createEntityReference('!');
} catch (DOMException $e) {
var_dump($e->getCode() === DOM_INVALID_CHARACTER_ERR);
echo $e->getMessage();
}
?>
--EXPECT--
bool(true)
Invalid Character Error

View File

@@ -0,0 +1,11 @@
--TEST--
DOMEntityReference - read $nodeName property
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$der = new DOMEntityReference('nbsp');
var_dump($der->nodeName);
?>
--EXPECT--
string(4) "nbsp"

View File

@@ -0,0 +1,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