Ejemplo n.º 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));
 }
Ejemplo n.º 2
0
function all($repeatable, PredicateInterface $predicate) : bool
{
    return Repeatables::all($repeatable, $predicate);
}