public function ColumnCellIteratorTest::testIteratorSeekAndPrev in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Worksheet/ColumnCellIteratorTest.php \ColumnCellIteratorTest::testIteratorSeekAndPrev()
File
- vendor/
phpoffice/ phpexcel/ unitTests/ Classes/ PHPExcel/ Worksheet/ ColumnCellIteratorTest.php, line 56
Class
Code
public function testIteratorSeekAndPrev() {
$iterator = new PHPExcel_Worksheet_ColumnCellIterator($this->mockWorksheet, 'A', 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());
}
}