1--TEST--
2Dom\XMLDocument interaction with XPath evaluate - errors
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\XMLDocument::createFromString('<root/>');
9
10$xpath = new Dom\XPath($dom);
11
12try {
13    var_dump($xpath->evaluate('-'));
14} catch (Error $e) {
15    var_dump($e->getMessage());
16}
17
18?>
19--EXPECTF--
20Warning: Dom\XPath::evaluate(): Invalid expression in %s on line %d
21string(35) "Could not evaluate XPath expression"
22