You are here

public function ColumnCellIteratorTest::setUp in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Worksheet/ColumnCellIteratorTest.php \ColumnCellIteratorTest::setUp()

File

vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Worksheet/ColumnCellIteratorTest.php, line 8

Class

ColumnCellIteratorTest

Code

public function setUp() {
  if (!defined('PHPEXCEL_ROOT')) {
    define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
  }
  require_once PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php';
  $this->mockCell = $this
    ->getMockBuilder('PHPExcel_Cell')
    ->disableOriginalConstructor()
    ->getMock();
  $this->mockWorksheet = $this
    ->getMockBuilder('PHPExcel_Worksheet')
    ->disableOriginalConstructor()
    ->getMock();
  $this->mockWorksheet
    ->expects($this
    ->any())
    ->method('getHighestRow')
    ->will($this
    ->returnValue(5));
  $this->mockWorksheet
    ->expects($this
    ->any())
    ->method('getCellByColumnAndRow')
    ->will($this
    ->returnValue($this->mockCell));
}