public function valid() { if (!isset($this->currentChunk)) { $this->fetchChunk(); } return !empty($this->currentChunk); }
/** * @test */ public function shouldNotBeValidForEmptyArray() { //given $batchIterator = new BatchingIterator(new ArrayIterator(array()), 2); //when $valid = $batchIterator->valid(); //then $this->assertFalse($valid); }