Skip to content

Commit 3571310

Browse files
committed
Test is/where
1 parent ef23ee8 commit 3571310

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
--TEST--
2+
CSS Selectors - Pseudo classes: is/where
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+
<article>
13+
<p>1</p>
14+
</article>
15+
<main>
16+
<p>2</p>
17+
</main>
18+
<div>
19+
<p>3</p>
20+
</div>
21+
</container>
22+
XML);
23+
24+
test_helper($dom, ':is(article, main) p');
25+
test_helper($dom, ':where(article, main) p');
26+
27+
?>
28+
--EXPECT--
29+
--- Selector: :is(article, main) p ---
30+
<p>1</p>
31+
<p>2</p>
32+
--- Selector: :where(article, main) p ---
33+
<p>1</p>
34+
<p>2</p>

0 commit comments

Comments
 (0)