10                if (!
defined(
'PHPEXCEL_ROOT')) {
 
   11                        define(
'PHPEXCEL_ROOT', APPLICATION_PATH . 
'/');
 
   13                require_once(PHPEXCEL_ROOT . 
'PHPExcel/Autoloader.php');
 
   15        $this->mockCell = $this->getMockBuilder(
'PHPExcel_Cell')
 
   16            ->disableOriginalConstructor()
 
   19        $this->mockWorksheet = $this->getMockBuilder(
'PHPExcel_Worksheet')
 
   20            ->disableOriginalConstructor()
 
   23        $this->mockWorksheet->expects($this->any())
 
   24                 ->method(
'getHighestColumn')
 
   25                 ->will($this->returnValue(
'E'));
 
   26        $this->mockWorksheet->expects($this->any())
 
   27                 ->method(
'getCellByColumnAndRow')
 
   28                 ->will($this->returnValue($this->mockCell));
 
   35        $RowCellIndexResult = 
'A';
 
   36        $this->assertEquals($RowCellIndexResult, $iterator->key());
 
   38        foreach($iterator as 
$key => $RowCell) {
 
   39            $this->assertEquals($RowCellIndexResult++, 
$key);
 
   40            $this->assertInstanceOf(
'PHPExcel_Cell', $RowCell);
 
   47        $RowCellIndexResult = 
'B';
 
   48        $this->assertEquals($RowCellIndexResult, $iterator->key());
 
   50        foreach($iterator as 
$key => $RowCell) {
 
   51            $this->assertEquals($RowCellIndexResult++, 
$key);
 
   52            $this->assertInstanceOf(
'PHPExcel_Cell', $RowCell);
 
   58        $ranges = range(
'A',
'E');
 
   60        $RowCellIndexResult = 
'D';
 
   62        $this->assertEquals($RowCellIndexResult, $iterator->key());
 
   64        for(
$i = 1; 
$i < array_search($RowCellIndexResult, $ranges); 
$i++) {
 
   66            $expectedResult = $ranges[array_search($RowCellIndexResult, $ranges) - 
$i];
 
   67            $this->assertEquals($expectedResult, $iterator->key());
 
An exception for terminatinating execution or to throw for unit testing.
testSeekOutOfRange()
@expectedException PHPExcel_Exception
testPrevOutOfRange()
@expectedException PHPExcel_Exception
testIteratorStartEndRange()
testIteratorSeekAndPrev()
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'