Skip to content

Commit 1c69053

Browse files
committed
Test matches() invalid selector
1 parent ca11f04 commit 1c69053

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
Test DOM\Element::matches() method: invalid selector
3+
--EXTENSIONS--
4+
dom
5+
--FILE--
6+
<?php
7+
8+
$dom = DOM\XMLDocument::createFromString("<root/>");
9+
10+
try {
11+
var_dump($dom->documentElement->matches('@invalid'));
12+
} catch (DOMException $e) {
13+
echo $e->getMessage();
14+
}
15+
16+
?>
17+
--EXPECT--
18+
Invalid selector (Selectors. Unexpected token: @invalid)

0 commit comments

Comments
 (0)