/**
  * Is the value equal to another value, as tested by the use of the "=="
  * comparison operator?
  */
 function equalTo($item)
 {
     return \Hamcrest\Core\IsEqual::equalTo($item);
 }
Пример #2
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.
  *
  * @factory
  */
 public static function hasXPath($xpath, $matcher = null)
 {
     if ($matcher === null || $matcher instanceof Matcher) {
         return new self($xpath, $matcher);
     } elseif (is_int($matcher) && strpos($xpath, 'count(') !== 0) {
         $xpath = 'count(' . $xpath . ')';
     }
     return new self($xpath, IsEqual::equalTo($matcher));
 }
 protected function createMatcher()
 {
     return \Hamcrest\Core\IsEqual::equalTo('irrelevant');
 }