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