We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a93703a commit ef23ee8Copy full SHA for ef23ee8
ext/dom/tests/querySelector/pseudo_classes_has.phpt
@@ -0,0 +1,33 @@
1
+--TEST--
2
+CSS Selectors - Pseudo classes: has
3
+--EXTENSIONS--
4
+dom
5
+--FILE--
6
+<?php
7
+
8
+require __DIR__ . '/test_utils.inc';
9
10
+$dom = DOM\XMLDocument::createFromString(<<<XML
11
+<container>
12
+ <div>
13
+ <p class="foo"/>
14
+ </div>
15
16
+ <p/>
17
18
+</container>
19
+XML);
20
21
+test_helper($dom, 'div:has(p.foo)');
22
+test_helper($dom, 'div:has(:not(p.foo))');
23
24
+?>
25
+--EXPECT--
26
+--- Selector: div:has(p.foo) ---
27
+<div>
28
29
30
+--- Selector: div:has(:not(p.foo)) ---
31
32
33
0 commit comments