advanceTo() public method

public advanceTo ( $lineNumber )
$lineNumber zero-based index
Example #1
0
 /**
  * @dataProvider getReadersNoHeadersFirstRow
  */
 public function testAdvanceToNoHeadersFirstRow(Reader $reader)
 {
     $row = array(0 => 'Some Meta Data', 1 => '', 2 => '');
     $actualRow = $reader->getRow();
     $this->assertEquals($row, $actualRow);
     // give it the ol' one-two-switcharoo
     $reader->advanceTo(3);
     $reader->getRow();
     $reader->advanceTo(0);
     $this->assertEquals($row, $reader->getRow());
 }
Example #2
0
 /**
  * @dataProvider getReaders
  * @expectedException \LogicException
  */
 public function testAdvanceToPastEof(Reader $reader)
 {
     $reader->advanceTo(999);
 }