示例#1
0
 public function testAll()
 {
     $predicate = Predicate(function ($value, $key) {
         return $value < 6;
     });
     $this->assertTrue(Repeatables::all(self::getArray(), $predicate));
     $this->assertTrue(Repeatables::all(self::getIterator(), $predicate));
     $this->assertTrue(Repeatables::all(self::getIteratorAggregate(), $predicate));
 }
示例#2
0
function all($repeatable, PredicateInterface $predicate) : bool
{
    return Repeatables::all($repeatable, $predicate);
}