/** @test */ public function testHasNext() { $it = new CachingIterator(range(1, 5)); $this->assertTrue($it->hasNext()); $it = new CachingIterator(new EmptyIterator()); $this->assertFalse($it->hasNext()); }
public function rewind() { $this->isCurrentChildrenCacheValid = false; return parent::rewind(); }