Definition at line 4 of file AutoFilterTest.php.
◆ setUp()
AutoFilterTest::setUp |
( |
| ) |
|
Definition at line 11 of file AutoFilterTest.php.
References defined.
13 if (!
defined(
'PHPEXCEL_ROOT')) {
14 define(
'PHPEXCEL_ROOT', APPLICATION_PATH .
'/');
16 require_once(PHPEXCEL_ROOT .
'PHPExcel/Autoloader.php');
18 $this->_mockWorksheetObject = $this->getMockBuilder(
'PHPExcel_Worksheet')
19 ->disableOriginalConstructor()
21 $this->_mockCacheController = $this->getMockBuilder(
'PHPExcel_CachedObjectStorage_Memory')
22 ->disableOriginalConstructor()
24 $this->_mockWorksheetObject->expects($this->any())
25 ->method(
'getCellCacheController')
26 ->will($this->returnValue($this->_mockCacheController));
29 $this->_testInitialRange,
30 $this->_mockWorksheetObject
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
◆ testClearRange()
AutoFilterTest::testClearRange |
( |
| ) |
|
Definition at line 82 of file AutoFilterTest.php.
References $result.
87 $result = $this->_testAutoFilterObject->setRange();
88 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter',
$result);
91 $result = $this->_testAutoFilterObject->getRange();
92 $this->assertEquals($expectedResult,
$result);
◆ testClearRangeWithExistingColumns()
AutoFilterTest::testClearRangeWithExistingColumns |
( |
| ) |
|
Definition at line 275 of file AutoFilterTest.php.
References $result, and array.
277 $expectedResult =
'';
279 $columnIndexes =
array(
'L',
'M',
'N');
280 foreach($columnIndexes as $columnIndex) {
281 $this->_testAutoFilterObject->setColumn($columnIndex);
285 $result = $this->_testAutoFilterObject->setRange();
286 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter',
$result);
289 $result = $this->_testAutoFilterObject->getRange();
290 $this->assertEquals($expectedResult,
$result);
293 $result = $this->_testAutoFilterObject->getColumns();
294 $this->assertInternalType(
'array',
$result);
295 $this->assertEquals(0, count(
$result));
Create styles array
The data for the language used.
◆ testClone()
AutoFilterTest::testClone |
( |
| ) |
|
Definition at line 328 of file AutoFilterTest.php.
References $_testAutoFilterObject, $result, and array.
330 $columnIndexes =
array(
'L',
'M');
332 foreach($columnIndexes as $columnIndex) {
333 $this->_testAutoFilterObject->setColumn($columnIndex);
337 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter',
$result);
Create styles array
The data for the language used.
◆ testGetColumn()
AutoFilterTest::testGetColumn |
( |
| ) |
|
Definition at line 224 of file AutoFilterTest.php.
References $result, and array.
226 $columnIndexes =
array(
'L',
'M');
228 foreach($columnIndexes as $columnIndex) {
229 $this->_testAutoFilterObject->setColumn($columnIndex);
234 foreach($columnIndexes as $columnIndex) {
235 $result = $this->_testAutoFilterObject->getColumn($columnIndex);
236 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter_Column',
$result);
Create styles array
The data for the language used.
◆ testGetColumnByOffset()
AutoFilterTest::testGetColumnByOffset |
( |
| ) |
|
Definition at line 240 of file AutoFilterTest.php.
References $result, and array.
242 $columnIndexes =
array( 0 =>
'H',
249 foreach($columnIndexes as $columnIndex => $columnID) {
250 $result = $this->_testAutoFilterObject->getColumnByOffset($columnIndex);
251 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter_Column',
$result);
252 $this->assertEquals(
$result->getColumnIndex(),$columnID);
Create styles array
The data for the language used.
◆ testGetColumnIfNotSet()
AutoFilterTest::testGetColumnIfNotSet |
( |
| ) |
|
◆ testGetColumnOffset()
AutoFilterTest::testGetColumnOffset |
( |
| ) |
|
Definition at line 113 of file AutoFilterTest.php.
References $result, and array.
115 $columnIndexes =
array(
'H' => 0,
122 foreach($columnIndexes as $columnIndex => $columnOffset) {
123 $result = $this->_testAutoFilterObject->getColumnOffset($columnIndex);
124 $this->assertEquals($columnOffset,
$result);
Create styles array
The data for the language used.
◆ testGetColumns()
AutoFilterTest::testGetColumns |
( |
| ) |
|
Definition at line 205 of file AutoFilterTest.php.
References $result, and array.
207 $columnIndexes =
array(
'L',
'M');
209 foreach($columnIndexes as $columnIndex) {
210 $this->_testAutoFilterObject->setColumn($columnIndex);
213 $result = $this->_testAutoFilterObject->getColumns();
216 $this->assertInternalType(
'array',
$result);
217 $this->assertEquals(count($columnIndexes), count(
$result));
218 foreach($columnIndexes as $columnIndex) {
219 $this->assertArrayHasKey($columnIndex,
$result);
220 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter_Column',
$result[$columnIndex]);
Create styles array
The data for the language used.
◆ testGetColumnsEmpty()
AutoFilterTest::testGetColumnsEmpty |
( |
| ) |
|
◆ testGetColumnWithoutRangeSet()
AutoFilterTest::testGetColumnWithoutRangeSet |
( |
| ) |
|
◆ testGetInvalidColumnOffset()
AutoFilterTest::testGetInvalidColumnOffset |
( |
| ) |
|
◆ testGetParent()
AutoFilterTest::testGetParent |
( |
| ) |
|
◆ testGetRange()
AutoFilterTest::testGetRange |
( |
| ) |
|
◆ testSetColumnWithColumnObject()
AutoFilterTest::testSetColumnWithColumnObject |
( |
| ) |
|
Definition at line 165 of file AutoFilterTest.php.
References $result.
167 $expectedResult =
'M';
171 $result = $this->_testAutoFilterObject->setColumn($columnObject);
172 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter',
$result);
174 $result = $this->_testAutoFilterObject->getColumns();
177 $this->assertInternalType(
'array',
$result);
178 $this->assertEquals(1, count(
$result));
179 $this->assertArrayHasKey($expectedResult,
$result);
180 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter_Column',
$result[$expectedResult]);
◆ testSetColumnWithInvalidDataType()
AutoFilterTest::testSetColumnWithInvalidDataType |
( |
| ) |
|
◆ testSetColumnWithString()
AutoFilterTest::testSetColumnWithString |
( |
| ) |
|
Definition at line 138 of file AutoFilterTest.php.
References $result.
140 $expectedResult =
'L';
143 $result = $this->_testAutoFilterObject->setColumn($expectedResult);
144 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter',
$result);
146 $result = $this->_testAutoFilterObject->getColumns();
149 $this->assertInternalType(
'array',
$result);
150 $this->assertEquals(1, count(
$result));
151 $this->assertArrayHasKey($expectedResult,
$result);
152 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter_Column',
$result[$expectedResult]);
◆ testSetInvalidColumnWithObject()
AutoFilterTest::testSetInvalidColumnWithObject |
( |
| ) |
|
◆ testSetInvalidColumnWithString()
AutoFilterTest::testSetInvalidColumnWithString |
( |
| ) |
|
◆ testSetParent()
AutoFilterTest::testSetParent |
( |
| ) |
|
Definition at line 49 of file AutoFilterTest.php.
References $result.
52 $result = $this->_testAutoFilterObject->setParent($this->_mockWorksheetObject);
53 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter',
$result);
◆ testSetRange()
AutoFilterTest::testSetRange |
( |
| ) |
|
Definition at line 65 of file AutoFilterTest.php.
References $result, and array.
67 $ranges =
array(
'G1:J512' =>
'Worksheet1!G1:J512',
71 foreach($ranges as $actualRange => $fullRange) {
73 $result = $this->_testAutoFilterObject->setRange($fullRange);
74 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter',
$result);
77 $result = $this->_testAutoFilterObject->getRange();
78 $this->assertEquals($actualRange,
$result);
Create styles array
The data for the language used.
◆ testSetRangeInvalidRange()
AutoFilterTest::testSetRangeInvalidRange |
( |
| ) |
|
◆ testSetRangeWithExistingColumns()
AutoFilterTest::testSetRangeWithExistingColumns |
( |
| ) |
|
Definition at line 298 of file AutoFilterTest.php.
References $result, and array.
300 $expectedResult =
'G1:J512';
303 $columnIndexes1 =
array(
'I',
'J');
304 foreach($columnIndexes1 as $columnIndex) {
305 $this->_testAutoFilterObject->setColumn($columnIndex);
308 $columnIndexes2 =
array(
'K',
'L',
'M');
309 foreach($columnIndexes2 as $columnIndex) {
310 $this->_testAutoFilterObject->setColumn($columnIndex);
314 $result = $this->_testAutoFilterObject->setRange($expectedResult);
315 $this->assertInstanceOf(
'PHPExcel_Worksheet_AutoFilter',
$result);
318 $result = $this->_testAutoFilterObject->getRange();
319 $this->assertEquals($expectedResult,
$result);
323 $result = $this->_testAutoFilterObject->getColumns();
324 $this->assertInternalType(
'array',
$result);
325 $this->assertEquals(count($columnIndexes1), count(
$result));
Create styles array
The data for the language used.
◆ testToString()
AutoFilterTest::testToString |
( |
| ) |
|
◆ $_testAutoFilterObject
AutoFilterTest::$_testAutoFilterObject |
|
private |
◆ $_testInitialRange
AutoFilterTest::$_testInitialRange = 'H2:O256' |
|
private |
The documentation for this class was generated from the following file:
- libs/composer/vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Worksheet/AutoFilterTest.php