This commit is contained in:
Mark Baker 2019-04-15 22:49:51 +02:00 committed by GitHub
parent 37493de234
commit 170671c616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -2,12 +2,10 @@
namespace PhpOffice\PhpSpreadsheetTests\Functional; namespace PhpOffice\PhpSpreadsheetTests\Functional;
use PhpOffice\PhpSpreadsheet\Reader\IReadFilter;
use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Spreadsheet;
class ReadBlankCellsTest extends AbstractFunctional class ReadBlankCellsTest extends AbstractFunctional
{ {
public function providerSheetFormat() public function providerSheetFormat()
{ {
return [ return [
@ -20,7 +18,7 @@ class ReadBlankCellsTest extends AbstractFunctional
} }
/** /**
* Test generate file with some empty cells * Test generate file with some empty cells.
* *
* @dataProvider providerSheetFormat * @dataProvider providerSheetFormat
* *
@ -39,12 +37,11 @@ class ReadBlankCellsTest extends AbstractFunctional
$this->assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C2')); $this->assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C2'));
$this->assertTrue($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C3')); $this->assertTrue($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C3'));
$reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format, function($reader) { $reloadedSpreadsheet = $this->writeAndReload($spreadsheet, $format, function ($reader) {
$reader->setReadEmptyCells(false); $reader->setReadEmptyCells(false);
}); });
$this->assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('B2')); $this->assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('B2'));
$this->assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C2')); $this->assertFalse($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C2'));
$this->assertTrue($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C3')); $this->assertTrue($reloadedSpreadsheet->getActiveSheet()->getCellCollection()->has('C3'));
} }
} }