Example #1
0
 /**
  * @covers Gacela\Collection\Statement::rewind
  */
 public function testRewind()
 {
     $this->assertSame(1, $this->collection->current()->id);
     $this->assertSame(0, $this->collection->key());
     foreach ($this->collection as $obj) {
     }
     $this->assertNull($this->collection->current()->id);
     $this->assertSame(7, $this->collection->key());
     $this->collection->rewind();
     $this->assertSame(1, $this->collection->current()->id);
     $this->assertSame(0, $this->collection->key());
 }