public function setUp() { $this->_either_3_or_4 = \Hamcrest\Core\CombinableMatcher::either(equalTo(3))->orElse(equalTo(4)); $this->_not_3_and_not_4 = \Hamcrest\Core\CombinableMatcher::both(not(equalTo(3)))->andAlso(not(equalTo(4))); }
/** * This is useful for fluently combining matchers that must both pass. * For example: * <pre> * assertThat($string, both(containsString("a"))->andAlso(containsString("b"))); * </pre> */ function both(\Hamcrest\Matcher $matcher) { return \Hamcrest\Core\CombinableMatcher::both($matcher); }