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