Пример #1
0
 public function testRewind()
 {
     $this->object->next();
     $this->object->next();
     $this->assertEquals(2, $this->object->current()->getMatchable()->getId());
     $this->object->rewind();
     $this->assertEquals(0, $this->object->current()->getMatchable()->getId());
     $this->object->next();
     $this->assertEquals(1, $this->object->current()->getMatchable()->getId());
 }
 /**
  * rewind
  *
  * @return void
  */
 public function rewind()
 {
     parent::rewind();
     if ($this->valid() && $this->current()->getType() != $this->type) {
         $this->next();
     }
 }