/**
  * Fetches the next item from the resultset, moves the cursor forward, and removes the prefix from the image id.
  */
 private function fetchRow()
 {
     ++$this->cursor;
     $imageId = $this->rowReader->getRow();
     if (substr($imageId, 0, strlen($this->prefix)) == $this->prefix) {
         $imageId = ltrim(substr($imageId, strlen($this->prefix)), '/');
     }
     $this->item = $imageId;
 }
 private function configureRowReaderMock(array $fileList)
 {
     $mockInvocator = $this->rowReaderMock->expects($this->any())->method('getRow');
     call_user_func_array(array($mockInvocator, 'willReturnOnConsecutiveCalls'), $fileList);
     $this->rowReaderMock->expects($this->any())->method('getCount')->willReturn(count($fileList));
 }