/** * Test if the value is an array containing elements that match all of these * matchers. * * Example: * <pre> * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b'))); * </pre> * * @factory ... */ public static function hasItems() { $args = func_get_args(); $matchers = array(); foreach ($args as $arg) { $matchers[] = self::hasItem($arg); } return Hamcrest_Core_AllOf::allOf($matchers); }
protected function createMatcher() { return Hamcrest_Core_AllOf::allOf('irrelevant'); }