1--TEST--
2Node::$baseURI
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\HTMLDocument::createEmpty();
9$html = $dom->appendChild($dom->createElement('html'));
10var_dump($html->baseURI);
11
12$dom = Dom\HTMLDocument::createFromFile(__DIR__ . "/../../empty.html", LIBXML_NOERROR);
13var_dump($dom->documentElement->baseURI);
14
15$dom = Dom\HTMLDocument::createFromString(<<<HTML
16<!DOCTYPE html>
17<html>
18    <head>
19        <base href="http://example.com/">
20    </head>
21</html>
22HTML);
23var_dump($dom->documentElement->baseURI);
24
25?>
26--EXPECTF--
27string(11) "about:blank"
28string(%d) "file://%sempty.html"
29string(19) "http://example.com/"
30