public function RowIteratorTest::testIteratorSeekAndPrev in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Worksheet/RowIteratorTest.php \RowIteratorTest::testIteratorSeekAndPrev()
File
- vendor/
phpoffice/ phpexcel/ unitTests/ Classes/ PHPExcel/ Worksheet/ RowIteratorTest.php, line 56
Class
Code
public function testIteratorSeekAndPrev() {
$iterator = new PHPExcel_Worksheet_RowIterator($this->mockWorksheet, 2, 4);
$columnIndexResult = 4;
$iterator
->seek(4);
$this
->assertEquals($columnIndexResult, $iterator
->key());
for ($i = 1; $i < $columnIndexResult - 1; $i++) {
$iterator
->prev();
$this
->assertEquals($columnIndexResult - $i, $iterator
->key());
}
}