/** * Wraps <code>$matcher</code> with {@link Hamcrest_Core_IsEqual) * if it's not a matcher and the XPath in <code>count()</code> * if it's an integer. */ function hasXPath($xpath, $matcher = null) { require_once 'Hamcrest/Xml/HasXPath.php'; return Hamcrest_Xml_HasXPath::hasXPath($xpath, $matcher); }
protected function createMatcher() { return Hamcrest_Xml_HasXPath::hasXPath('/users/user'); }