ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
WorksheetColumnTest.php
Go to the documentation of this file.
1 <?php
2 
4 {
5  public $mockWorksheet;
6  public $mockColumn;
7 
8  public function setUp()
9  {
10  if (!defined('PHPEXCEL_ROOT')) {
11  define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
12  }
13  require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
14 
15  $this->mockWorksheet = $this->getMockBuilder('PHPExcel_Worksheet')
16  ->disableOriginalConstructor()
17  ->getMock();
18  $this->mockWorksheet->expects($this->any())
19  ->method('getHighestRow')
20  ->will($this->returnValue(5));
21  }
22 
23 
24  public function testInstantiateColumnDefault()
25  {
26  $column = new PHPExcel_Worksheet_Column($this->mockWorksheet);
27  $this->assertInstanceOf('PHPExcel_Worksheet_Column', $column);
28  $columnIndex = $column->getColumnIndex();
29  $this->assertEquals('A', $columnIndex);
30  }
31 
33  {
34  $column = new PHPExcel_Worksheet_Column($this->mockWorksheet, 'E');
35  $this->assertInstanceOf('PHPExcel_Worksheet_Column', $column);
36  $columnIndex = $column->getColumnIndex();
37  $this->assertEquals('E', $columnIndex);
38  }
39 
40  public function testGetCellIterator()
41  {
42  $column = new PHPExcel_Worksheet_Column($this->mockWorksheet);
43  $cellIterator = $column->getCellIterator();
44  $this->assertInstanceOf('PHPExcel_Worksheet_ColumnCellIterator', $cellIterator);
45  }
46 }
$column
Definition: 39dropdown.php:62
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27