You are here

public function ColumnIteratorTest::setUp in Loft Data Grids 7.2

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

File

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

Class

ColumnIteratorTest

Code

public function setUp() {
  if (!defined('PHPEXCEL_ROOT')) {
    define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
  }
  require_once PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php';
  $this->mockColumn = $this
    ->getMockBuilder('PHPExcel_Worksheet_Column')
    ->disableOriginalConstructor()
    ->getMock();
  $this->mockWorksheet = $this
    ->getMockBuilder('PHPExcel_Worksheet')
    ->disableOriginalConstructor()
    ->getMock();
  $this->mockWorksheet
    ->expects($this
    ->any())
    ->method('getHighestColumn')
    ->will($this
    ->returnValue('E'));
  $this->mockWorksheet
    ->expects($this
    ->any())
    ->method('current')
    ->will($this
    ->returnValue($this->mockColumn));
}