1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Files
archived-php-src/ext/dom/tests/bug67474.phpt
T
Nikita Popov ab92ffee22 Make getElementsByTagNameNS $namespace nullable
According to the DOM specification, this argument is supposed to
be nullable.
2021-02-09 12:19:44 +01:00

30 lines
603 B
PHP

--TEST--
Bug #67474 getElementsByTagNameNS and default namespace
--SKIPIF--
<?php
require_once('skipif.inc');
?>
--FILE--
<?php
declare(strict_types=1);
$doc = new DOMDocument();
$doc->loadXML('<root xmlns:x="x"><a/><x:a/></root>');
$list = $doc->getElementsByTagNameNS('', 'a');
var_dump($list->length);
$list = $doc->getElementsByTagNameNS(null, 'a');
var_dump($list->length);
$elem = $doc->documentElement;
$list = $elem->getElementsByTagNameNS('', 'a');
var_dump($list->length);
$list = $elem->getElementsByTagNameNS(null, 'a');
var_dump($list->length);
?>
--EXPECT--
int(1)
int(1)
int(1)
int(1)