ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
WorksheetRowTest Class Reference
+ Inheritance diagram for WorksheetRowTest:
+ Collaboration diagram for WorksheetRowTest:

Public Member Functions

 setUp ()
 
 testInstantiateRowDefault ()
 
 testInstantiateRowSpecified ()
 
 testGetCellIterator ()
 

Data Fields

 $mockWorksheet
 
 $mockRow
 

Detailed Description

Definition at line 3 of file WorksheetRowTest.php.

Member Function Documentation

◆ setUp()

WorksheetRowTest::setUp ( )

Definition at line 8 of file WorksheetRowTest.php.

References defined.

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('getHighestColumn')
20  ->will($this->returnValue('E'));
21  }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

◆ testGetCellIterator()

WorksheetRowTest::testGetCellIterator ( )

Definition at line 40 of file WorksheetRowTest.php.

References $row.

41  {
42  $row = new PHPExcel_Worksheet_Row($this->mockWorksheet);
43  $cellIterator = $row->getCellIterator();
44  $this->assertInstanceOf('PHPExcel_Worksheet_RowCellIterator', $cellIterator);
45  }

◆ testInstantiateRowDefault()

WorksheetRowTest::testInstantiateRowDefault ( )

Definition at line 24 of file WorksheetRowTest.php.

References $row.

25  {
26  $row = new PHPExcel_Worksheet_Row($this->mockWorksheet);
27  $this->assertInstanceOf('PHPExcel_Worksheet_Row', $row);
28  $rowIndex = $row->getRowIndex();
29  $this->assertEquals(1, $rowIndex);
30  }

◆ testInstantiateRowSpecified()

WorksheetRowTest::testInstantiateRowSpecified ( )

Definition at line 32 of file WorksheetRowTest.php.

References $row.

33  {
34  $row = new PHPExcel_Worksheet_Row($this->mockWorksheet, 5);
35  $this->assertInstanceOf('PHPExcel_Worksheet_Row', $row);
36  $rowIndex = $row->getRowIndex();
37  $this->assertEquals(5, $rowIndex);
38  }

Field Documentation

◆ $mockRow

WorksheetRowTest::$mockRow

Definition at line 6 of file WorksheetRowTest.php.

◆ $mockWorksheet

WorksheetRowTest::$mockWorksheet

Definition at line 5 of file WorksheetRowTest.php.


The documentation for this class was generated from the following file: