ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
CellTest Class Reference
+ Inheritance diagram for CellTest:
+ Collaboration diagram for CellTest:

Public Member Functions

 setUp ()
 
 testColumnIndexFromString ()
 providerColumnString More...
 
 providerColumnString ()
 
 testColumnIndexFromStringTooLong ()
 
 testColumnIndexFromStringTooShort ()
 
 testStringFromColumnIndex ()
 providerColumnIndex More...
 
 providerColumnIndex ()
 
 testCoordinateFromString ()
 providerCoordinates More...
 
 providerCoordinates ()
 
 testCoordinateFromStringWithRangeAddress ()
 
 testCoordinateFromStringWithEmptyAddress ()
 
 testCoordinateFromStringWithInvalidAddress ()
 
 testAbsoluteCoordinateFromString ()
 providerAbsoluteCoordinates More...
 
 providerAbsoluteCoordinates ()
 
 testAbsoluteCoordinateFromStringWithRangeAddress ()
 
 testAbsoluteReferenceFromString ()
 providerAbsoluteReferences More...
 
 providerAbsoluteReferences ()
 
 testAbsoluteReferenceFromStringWithRangeAddress ()
 
 testSplitRange ()
 providerSplitRange More...
 
 providerSplitRange ()
 
 testBuildRange ()
 providerBuildRange More...
 
 providerBuildRange ()
 
 testBuildRangeInvalid ()
 
 testRangeBoundaries ()
 providerRangeBoundaries More...
 
 providerRangeBoundaries ()
 
 testRangeDimension ()
 providerRangeDimension More...
 
 providerRangeDimension ()
 
 testGetRangeBoundaries ()
 providerGetRangeBoundaries More...
 
 providerGetRangeBoundaries ()
 
 testExtractAllCellReferencesInRange ()
 providerExtractAllCellReferencesInRange More...
 
 providerExtractAllCellReferencesInRange ()
 

Detailed Description

Definition at line 6 of file CellTest.php.

Member Function Documentation

◆ providerAbsoluteCoordinates()

CellTest::providerAbsoluteCoordinates ( )

Definition at line 136 of file CellTest.php.

137  {
138  return new testDataFileIterator('rawTestData/CellAbsoluteCoordinate.data');
139  }

◆ providerAbsoluteReferences()

CellTest::providerAbsoluteReferences ( )

Definition at line 164 of file CellTest.php.

165  {
166  return new testDataFileIterator('rawTestData/CellAbsoluteReference.data');
167  }

◆ providerBuildRange()

CellTest::providerBuildRange ( )

Definition at line 214 of file CellTest.php.

215  {
216  return new testDataFileIterator('rawTestData/CellBuildRange.data');
217  }

◆ providerColumnIndex()

CellTest::providerColumnIndex ( )

Definition at line 68 of file CellTest.php.

69  {
70  return new testDataFileIterator('rawTestData/ColumnIndex.data');
71  }

◆ providerColumnString()

CellTest::providerColumnString ( )

Definition at line 28 of file CellTest.php.

29  {
30  return new testDataFileIterator('rawTestData/ColumnString.data');
31  }

◆ providerCoordinates()

CellTest::providerCoordinates ( )

Definition at line 84 of file CellTest.php.

85  {
86  return new testDataFileIterator('rawTestData/CellCoordinates.data');
87  }

◆ providerExtractAllCellReferencesInRange()

CellTest::providerExtractAllCellReferencesInRange ( )

Definition at line 290 of file CellTest.php.

291  {
292  return new testDataFileIterator('rawTestData/CellExtractAllCellReferencesInRange.data');
293  }

◆ providerGetRangeBoundaries()

CellTest::providerGetRangeBoundaries ( )

Definition at line 274 of file CellTest.php.

275  {
276  return new testDataFileIterator('rawTestData/CellGetRangeBoundaries.data');
277  }

◆ providerRangeBoundaries()

CellTest::providerRangeBoundaries ( )

Definition at line 242 of file CellTest.php.

243  {
244  return new testDataFileIterator('rawTestData/CellRangeBoundaries.data');
245  }

◆ providerRangeDimension()

CellTest::providerRangeDimension ( )

Definition at line 258 of file CellTest.php.

259  {
260  return new testDataFileIterator('rawTestData/CellRangeDimension.data');
261  }

◆ providerSplitRange()

CellTest::providerSplitRange ( )

Definition at line 198 of file CellTest.php.

199  {
200  return new testDataFileIterator('rawTestData/CellSplitRange.data');
201  }

◆ setUp()

CellTest::setUp ( )

Definition at line 9 of file CellTest.php.

References defined.

10  {
11  if (!defined('PHPEXCEL_ROOT')) {
12  define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
13  }
14  require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
15  }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

◆ testAbsoluteCoordinateFromString()

CellTest::testAbsoluteCoordinateFromString ( )

providerAbsoluteCoordinates

Definition at line 128 of file CellTest.php.

References $result, and array.

129  {
130  $args = func_get_args();
131  $expectedResult = array_pop($args);
132  $result = call_user_func_array(array('PHPExcel_Cell','absoluteCoordinate'),$args);
133  $this->assertEquals($expectedResult, $result);
134  }
$result
Create styles array
The data for the language used.

◆ testAbsoluteCoordinateFromStringWithRangeAddress()

CellTest::testAbsoluteCoordinateFromStringWithRangeAddress ( )

Definition at line 141 of file CellTest.php.

References $result, and array.

142  {
143  $cellAddress = 'A1:AI2012';
144  try {
145  $result = call_user_func(array('PHPExcel_Cell','absoluteCoordinate'),$cellAddress);
146  } catch (PHPExcel_Exception $e) {
147  $this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
148  return;
149  }
150  $this->fail('An expected exception has not been raised.');
151  }
$result
Create styles array
The data for the language used.

◆ testAbsoluteReferenceFromString()

CellTest::testAbsoluteReferenceFromString ( )

providerAbsoluteReferences

Definition at line 156 of file CellTest.php.

References $result, and array.

157  {
158  $args = func_get_args();
159  $expectedResult = array_pop($args);
160  $result = call_user_func_array(array('PHPExcel_Cell','absoluteReference'),$args);
161  $this->assertEquals($expectedResult, $result);
162  }
$result
Create styles array
The data for the language used.

◆ testAbsoluteReferenceFromStringWithRangeAddress()

CellTest::testAbsoluteReferenceFromStringWithRangeAddress ( )

Definition at line 169 of file CellTest.php.

References $result, and array.

170  {
171  $cellAddress = 'A1:AI2012';
172  try {
173  $result = call_user_func(array('PHPExcel_Cell','absoluteReference'),$cellAddress);
174  } catch (PHPExcel_Exception $e) {
175  $this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
176  return;
177  }
178  $this->fail('An expected exception has not been raised.');
179  }
$result
Create styles array
The data for the language used.

◆ testBuildRange()

CellTest::testBuildRange ( )

providerBuildRange

Definition at line 206 of file CellTest.php.

References $result, and array.

207  {
208  $args = func_get_args();
209  $expectedResult = array_pop($args);
210  $result = call_user_func_array(array('PHPExcel_Cell','buildRange'),$args);
211  $this->assertEquals($expectedResult, $result);
212  }
$result
Create styles array
The data for the language used.

◆ testBuildRangeInvalid()

CellTest::testBuildRangeInvalid ( )

Definition at line 219 of file CellTest.php.

References $result, and array.

220  {
221  $cellRange = '';
222  try {
223  $result = call_user_func(array('PHPExcel_Cell','buildRange'),$cellRange);
224  } catch (PHPExcel_Exception $e) {
225  $this->assertEquals($e->getMessage(), 'Range does not contain any information');
226  return;
227  }
228  $this->fail('An expected exception has not been raised.');
229  }
$result
Create styles array
The data for the language used.

◆ testColumnIndexFromString()

CellTest::testColumnIndexFromString ( )

providerColumnString

Definition at line 20 of file CellTest.php.

References $result, and array.

21  {
22  $args = func_get_args();
23  $expectedResult = array_pop($args);
24  $result = call_user_func_array(array('PHPExcel_Cell','columnIndexFromString'),$args);
25  $this->assertEquals($expectedResult, $result);
26  }
$result
Create styles array
The data for the language used.

◆ testColumnIndexFromStringTooLong()

CellTest::testColumnIndexFromStringTooLong ( )

Definition at line 33 of file CellTest.php.

References $result, and array.

34  {
35  $cellAddress = 'ABCD';
36  try {
37  $result = call_user_func(array('PHPExcel_Cell','columnIndexFromString'),$cellAddress);
38  } catch (PHPExcel_Exception $e) {
39  $this->assertEquals($e->getMessage(), 'Column string index can not be longer than 3 characters');
40  return;
41  }
42  $this->fail('An expected exception has not been raised.');
43  }
$result
Create styles array
The data for the language used.

◆ testColumnIndexFromStringTooShort()

CellTest::testColumnIndexFromStringTooShort ( )

Definition at line 45 of file CellTest.php.

References $result, and array.

46  {
47  $cellAddress = '';
48  try {
49  $result = call_user_func(array('PHPExcel_Cell','columnIndexFromString'),$cellAddress);
50  } catch (PHPExcel_Exception $e) {
51  $this->assertEquals($e->getMessage(), 'Column string index can not be empty');
52  return;
53  }
54  $this->fail('An expected exception has not been raised.');
55  }
$result
Create styles array
The data for the language used.

◆ testCoordinateFromString()

CellTest::testCoordinateFromString ( )

providerCoordinates

Definition at line 76 of file CellTest.php.

References $result, and array.

77  {
78  $args = func_get_args();
79  $expectedResult = array_pop($args);
80  $result = call_user_func_array(array('PHPExcel_Cell','coordinateFromString'),$args);
81  $this->assertEquals($expectedResult, $result);
82  }
$result
Create styles array
The data for the language used.

◆ testCoordinateFromStringWithEmptyAddress()

CellTest::testCoordinateFromStringWithEmptyAddress ( )

Definition at line 101 of file CellTest.php.

References $result, and array.

102  {
103  $cellAddress = '';
104  try {
105  $result = call_user_func(array('PHPExcel_Cell','coordinateFromString'),$cellAddress);
106  } catch (PHPExcel_Exception $e) {
107  $this->assertEquals($e->getMessage(), 'Cell coordinate can not be zero-length string');
108  return;
109  }
110  $this->fail('An expected exception has not been raised.');
111  }
$result
Create styles array
The data for the language used.

◆ testCoordinateFromStringWithInvalidAddress()

CellTest::testCoordinateFromStringWithInvalidAddress ( )

Definition at line 113 of file CellTest.php.

References $result, and array.

114  {
115  $cellAddress = 'AI';
116  try {
117  $result = call_user_func(array('PHPExcel_Cell','coordinateFromString'),$cellAddress);
118  } catch (PHPExcel_Exception $e) {
119  $this->assertEquals($e->getMessage(), 'Invalid cell coordinate '.$cellAddress);
120  return;
121  }
122  $this->fail('An expected exception has not been raised.');
123  }
$result
Create styles array
The data for the language used.

◆ testCoordinateFromStringWithRangeAddress()

CellTest::testCoordinateFromStringWithRangeAddress ( )

Definition at line 89 of file CellTest.php.

References $result, and array.

90  {
91  $cellAddress = 'A1:AI2012';
92  try {
93  $result = call_user_func(array('PHPExcel_Cell','coordinateFromString'),$cellAddress);
94  } catch (PHPExcel_Exception $e) {
95  $this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
96  return;
97  }
98  $this->fail('An expected exception has not been raised.');
99  }
$result
Create styles array
The data for the language used.

◆ testExtractAllCellReferencesInRange()

CellTest::testExtractAllCellReferencesInRange ( )

providerExtractAllCellReferencesInRange

Definition at line 282 of file CellTest.php.

References $result, and array.

283  {
284  $args = func_get_args();
285  $expectedResult = array_pop($args);
286  $result = call_user_func_array(array('PHPExcel_Cell','extractAllCellReferencesInRange'),$args);
287  $this->assertEquals($expectedResult, $result);
288  }
$result
Create styles array
The data for the language used.

◆ testGetRangeBoundaries()

CellTest::testGetRangeBoundaries ( )

providerGetRangeBoundaries

Definition at line 266 of file CellTest.php.

References $result, and array.

267  {
268  $args = func_get_args();
269  $expectedResult = array_pop($args);
270  $result = call_user_func_array(array('PHPExcel_Cell','getRangeBoundaries'),$args);
271  $this->assertEquals($expectedResult, $result);
272  }
$result
Create styles array
The data for the language used.

◆ testRangeBoundaries()

CellTest::testRangeBoundaries ( )

providerRangeBoundaries

Definition at line 234 of file CellTest.php.

References $result, and array.

235  {
236  $args = func_get_args();
237  $expectedResult = array_pop($args);
238  $result = call_user_func_array(array('PHPExcel_Cell','rangeBoundaries'),$args);
239  $this->assertEquals($expectedResult, $result);
240  }
$result
Create styles array
The data for the language used.

◆ testRangeDimension()

CellTest::testRangeDimension ( )

providerRangeDimension

Definition at line 250 of file CellTest.php.

References $result, and array.

251  {
252  $args = func_get_args();
253  $expectedResult = array_pop($args);
254  $result = call_user_func_array(array('PHPExcel_Cell','rangeDimension'),$args);
255  $this->assertEquals($expectedResult, $result);
256  }
$result
Create styles array
The data for the language used.

◆ testSplitRange()

CellTest::testSplitRange ( )

providerSplitRange

Definition at line 184 of file CellTest.php.

References $result, and array.

185  {
186  $args = func_get_args();
187  $expectedResult = array_pop($args);
188  $result = call_user_func_array(array('PHPExcel_Cell','splitRange'),$args);
189  foreach($result as $key => $split) {
190  if (!is_array($expectedResult[$key])) {
191  $this->assertEquals($expectedResult[$key], $split[0]);
192  } else {
193  $this->assertEquals($expectedResult[$key], $split);
194  }
195  }
196  }
$result
Create styles array
The data for the language used.

◆ testStringFromColumnIndex()

CellTest::testStringFromColumnIndex ( )

providerColumnIndex

Definition at line 60 of file CellTest.php.

References $result, and array.

61  {
62  $args = func_get_args();
63  $expectedResult = array_pop($args);
64  $result = call_user_func_array(array('PHPExcel_Cell','stringFromColumnIndex'),$args);
65  $this->assertEquals($expectedResult, $result);
66  }
$result
Create styles array
The data for the language used.

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