1--TEST--
2CSS Selectors - Pseudo classes: root
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8require __DIR__ . '/test_utils.inc';
9
10$dom = DOM\XMLDocument::createFromString(<<<XML
11<container/>
12XML);
13
14test_helper($dom, ':root', true);
15$fragment = $dom->createDocumentFragment();
16$fragment->appendXML('<div><p></p></div>');
17test_helper($fragment, ':root', true);
18test_helper($dom->createElement("foo"), ':root', true);
19
20test_helper($dom->createElement("not-a-root"), ":root", true);
21
22?>
23--EXPECT--
24--- Selector: :root ---
25container
26--- Selector: :root ---
27div
28--- Selector: :root ---
29--- Selector: :root ---
30