public function doAssert(\Hamcrest_Matcher $matcher, $message = null) { if (!empty($message)) { \Hamcrest_MatcherAssert::assertThat($message, $this->value, \Hamcrest_Core_Every::everyItem($matcher)); } else { \Hamcrest_MatcherAssert::assertThat($this->value, \Hamcrest_Core_Every::everyItem($matcher)); } }
/** * @param Hamcrest_Matcher $itemMatcher * A matcher to apply to every element in an array. * * @return Hamcrest_Core_Every * Evaluates to TRUE for a collection in which every item matches $itemMatcher */ function everyItem(Hamcrest_Matcher $itemMatcher) { require_once 'Hamcrest/Core/Every.php'; return Hamcrest_Core_Every::everyItem($itemMatcher); }
protected function createMatcher() { return Hamcrest_Core_Every::everyItem(anything()); }