public function hasNextAndNext() { $results = []; for ($c = new IOCollectionIterator(new FtpCollection($this->dir)); $c->hasNext();) { $results[] = $c->next()->getURI(); } $this->assertEquals(['/.ssh/', '/.bash_history'], $results); }
public function recursiveIteration() { for ($it = new IOCollectionIterator($this->fixture, true), $i = 0; $it->hasNext(); $i++) { $element = $it->next(); $this->assertInstanceOf(IOElement::class, $element); } $this->assertEquals($this->total, $i); }