mirror of
https://github.com/php/php-src.git
synced 2025-01-11 13:34:24 +08:00
add test
This commit is contained in:
parent
406910e1e9
commit
8c8f92f45f
17
ext/dom/tests/bug35342.phpt
Normal file
17
ext/dom/tests/bug35342.phpt
Normal file
@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug # 35342: isset(DOMNodeList->length) returns false
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.php'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML("<root><foo>foobar</foo><foo>foobar#2</foo></root>");
|
||||
|
||||
$nodelist = $dom->getElementsByTagName("foo");
|
||||
|
||||
var_dump($nodelist->length, isset($nodelist->length), isset($nodelist->foo));
|
||||
?>
|
||||
--EXPECT--
|
||||
int(2)
|
||||
bool(true)
|
||||
bool(false)
|
Loading…
Reference in New Issue
Block a user