public function testRewind() { $obj = new Tree(); $expected = new Tree(); $obj->add($expected); $obj->add(new Tree()); $obj->add(new Tree()); $obj->next(); $obj->rewind(); $this->assertSame($expected, $obj->current()); }
public function testRewind() { $obj = new Tree(); $expected = new Tree(); $obj->add($expected); $obj->add(new Tree()); $obj->add(new Tree()); $obj->next(); $obj->rewind(); $this->assertSame($expected, $obj->current()); }