public function AutoFilterTest::testClearRangeWithExistingColumns in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Worksheet/AutoFilterTest.php \AutoFilterTest::testClearRangeWithExistingColumns()
File
- vendor/
phpoffice/ phpexcel/ unitTests/ Classes/ PHPExcel/ Worksheet/ AutoFilterTest.php, line 275
Class
Code
public function testClearRangeWithExistingColumns() {
$expectedResult = '';
$columnIndexes = array(
'L',
'M',
'N',
);
foreach ($columnIndexes as $columnIndex) {
$this->_testAutoFilterObject
->setColumn($columnIndex);
}
// Setters return the instance to implement the fluent interface
$result = $this->_testAutoFilterObject
->setRange();
$this
->assertInstanceOf('PHPExcel_Worksheet_AutoFilter', $result);
// Range should be cleared
$result = $this->_testAutoFilterObject
->getRange();
$this
->assertEquals($expectedResult, $result);
// Column array should be cleared
$result = $this->_testAutoFilterObject
->getColumns();
$this
->assertInternalType('array', $result);
$this
->assertEquals(0, count($result));
}