Esempio n. 1
0
/**
 * 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);
}
Esempio n. 2
0
 protected function createMatcher()
 {
     return Hamcrest_Xml_HasXPath::hasXPath('/users/user');
 }