php-src/ext/dom/tests/DOMNode_getNodePath_basic.phpt
Max Semenik bd9f4fa676 Migrate skip checks to --EXTENSIONS--, p2
For rationale, see https://github.com/php/php-src/pull/6787

Make extension checks lowercase, add a special case for opcache
that has internal name not matching .so filename.

Extensions migrated in part 2:
* dom
* exif
* fileinfo
* ffi
2021-04-01 12:08:24 +01:00

17 lines
333 B
PHP

--TEST--
DOMNode::getNodePath()
--EXTENSIONS--
dom
--FILE--
<?php
$file = __DIR__.'/book.xml';
$doc = new DOMDocument();
$doc->load($file);
$nodes = $doc->getElementsByTagName('title');
foreach($nodes as $node) {
var_dump($node->getNodePath());
}
?>
--EXPECT--
string(20) "/books/book[1]/title"
string(20) "/books/book[2]/title"