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

Public Member Functions

 setUp ()
 
 testColumnIndexFromString ()
 @dataProvider providerColumnString More...
 
 providerColumnString ()
 
 testColumnIndexFromStringTooLong ()
 
 testColumnIndexFromStringTooShort ()
 
 testStringFromColumnIndex ()
 @dataProvider providerColumnIndex More...
 
 providerColumnIndex ()
 
 testCoordinateFromString ()
 @dataProvider providerCoordinates More...
 
 providerCoordinates ()
 
 testCoordinateFromStringWithRangeAddress ()
 
 testCoordinateFromStringWithEmptyAddress ()
 
 testCoordinateFromStringWithInvalidAddress ()
 
 testAbsoluteCoordinateFromString ()
 @dataProvider providerAbsoluteCoordinates More...
 
 providerAbsoluteCoordinates ()
 
 testAbsoluteCoordinateFromStringWithRangeAddress ()
 
 testAbsoluteReferenceFromString ()
 @dataProvider providerAbsoluteReferences More...
 
 providerAbsoluteReferences ()
 
 testAbsoluteReferenceFromStringWithRangeAddress ()
 
 testSplitRange ()
 @dataProvider providerSplitRange More...
 
 providerSplitRange ()
 
 testBuildRange ()
 @dataProvider providerBuildRange More...
 
 providerBuildRange ()
 
 testBuildRangeInvalid ()
 
 testRangeBoundaries ()
 @dataProvider providerRangeBoundaries More...
 
 providerRangeBoundaries ()
 
 testRangeDimension ()
 @dataProvider providerRangeDimension More...
 
 providerRangeDimension ()
 
 testGetRangeBoundaries ()
 @dataProvider providerGetRangeBoundaries More...
 
 providerGetRangeBoundaries ()
 
 testExtractAllCellReferencesInRange ()
 @dataProvider 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.

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

References defined.

◆ testAbsoluteCoordinateFromString()

CellTest::testAbsoluteCoordinateFromString ( )

@dataProvider providerAbsoluteCoordinates

Definition at line 128 of file CellTest.php.

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

References $result.

◆ testAbsoluteCoordinateFromStringWithRangeAddress()

CellTest::testAbsoluteCoordinateFromStringWithRangeAddress ( )

Definition at line 141 of file CellTest.php.

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 }

References $result.

◆ testAbsoluteReferenceFromString()

CellTest::testAbsoluteReferenceFromString ( )

@dataProvider providerAbsoluteReferences

Definition at line 156 of file CellTest.php.

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 }

References $result.

◆ testAbsoluteReferenceFromStringWithRangeAddress()

CellTest::testAbsoluteReferenceFromStringWithRangeAddress ( )

Definition at line 169 of file CellTest.php.

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 }

References $result.

◆ testBuildRange()

CellTest::testBuildRange ( )

@dataProvider providerBuildRange

Definition at line 206 of file CellTest.php.

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 }

References $result.

◆ testBuildRangeInvalid()

CellTest::testBuildRangeInvalid ( )

Definition at line 219 of file CellTest.php.

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 }

References $result.

◆ testColumnIndexFromString()

CellTest::testColumnIndexFromString ( )

@dataProvider providerColumnString

Definition at line 20 of file CellTest.php.

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 }

References $result.

◆ testColumnIndexFromStringTooLong()

CellTest::testColumnIndexFromStringTooLong ( )

Definition at line 33 of file CellTest.php.

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 }

References $result.

◆ testColumnIndexFromStringTooShort()

CellTest::testColumnIndexFromStringTooShort ( )

Definition at line 45 of file CellTest.php.

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 }

References $result.

◆ testCoordinateFromString()

CellTest::testCoordinateFromString ( )

@dataProvider providerCoordinates

Definition at line 76 of file CellTest.php.

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 }

References $result.

◆ testCoordinateFromStringWithEmptyAddress()

CellTest::testCoordinateFromStringWithEmptyAddress ( )

Definition at line 101 of file CellTest.php.

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 }

References $result.

◆ testCoordinateFromStringWithInvalidAddress()

CellTest::testCoordinateFromStringWithInvalidAddress ( )

Definition at line 113 of file CellTest.php.

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 }

References $result.

◆ testCoordinateFromStringWithRangeAddress()

CellTest::testCoordinateFromStringWithRangeAddress ( )

Definition at line 89 of file CellTest.php.

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 }

References $result.

◆ testExtractAllCellReferencesInRange()

CellTest::testExtractAllCellReferencesInRange ( )

@dataProvider providerExtractAllCellReferencesInRange

Definition at line 282 of file CellTest.php.

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 }

References $result.

◆ testGetRangeBoundaries()

CellTest::testGetRangeBoundaries ( )

@dataProvider providerGetRangeBoundaries

Definition at line 266 of file CellTest.php.

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 }

References $result.

◆ testRangeBoundaries()

CellTest::testRangeBoundaries ( )

@dataProvider providerRangeBoundaries

Definition at line 234 of file CellTest.php.

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 }

References $result.

◆ testRangeDimension()

CellTest::testRangeDimension ( )

@dataProvider providerRangeDimension

Definition at line 250 of file CellTest.php.

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 }

References $result.

◆ testSplitRange()

CellTest::testSplitRange ( )

@dataProvider providerSplitRange

Definition at line 184 of file CellTest.php.

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 }
$key
Definition: croninfo.php:18

References $key, and $result.

◆ testStringFromColumnIndex()

CellTest::testStringFromColumnIndex ( )

@dataProvider providerColumnIndex

Definition at line 60 of file CellTest.php.

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 }

References $result.


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