public function recursiveIteration() { for ($it = new IOCollectionIterator($this->fixture, TRUE), $i = 0; $it->hasNext(); $i++) { $element = $it->next(); $this->assertSubclass($element, 'io.collections.IOElement'); } $this->assertEquals($this->total, $i); }
public function hasNextAndNext() { $results = array(); for ($c = new IOCollectionIterator(new FtpCollection($this->dir)); $c->hasNext();) { $results[] = $c->next()->getURI(); } $this->assertEquals(array('/.ssh/', '/.bash_history'), $results); }
/** * Creates a string representation of this iterator * * @return string */ public function toString() { return parent::toString() . "@{\n " . xp::stringOf($this->filter, ' ') . "\n}"; }