コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
ファイル: AllOfTest.php プロジェクト: zhangjingli35/hamcrest
 protected function createMatcher()
 {
     return Hamcrest_Core_AllOf::allOf('irrelevant');
 }