Merge branch 'master' of github.com:box/spout into add-phpstan
Conflicts: .travis.yml CONTRIBUTING.md composer.json src/Spout/Common/Entity/Cell.php tests/Spout/Writer/ODS/WriterTest.php
This commit is contained in:
commit
540667870a
49 files changed
+529
-152
No files matched your search
@@ -72,6 +72,19 @@ class ReaderTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testReadShouldSupportInlineStringsWithMultipleValueNodes()
|
||||
{
|
||||
$allRows = $this->getAllRowsForFile('sheet_with_multiple_value_nodes_in_inline_strings.xlsx');
|
||||
|
||||
$expectedRows = [
|
||||
['VALUE 1 VALUE 2 VALUE 3 VALUE 4', 's1 - B1'],
|
||||
];
|
||||
$this->assertEquals($expectedRows, $allRows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
@@ -539,6 +552,10 @@ class ReaderTest extends TestCase
|
||||
*/
|
||||
public function testReadShouldBeProtectedAgainstQuadraticBlowupAttack()
|
||||
{
|
||||
if (function_exists('xdebug_code_coverage_started') && xdebug_code_coverage_started()) {
|
||||
$this->markTestSkipped('test not compatible with code coverage');
|
||||
}
|
||||
|
||||
$startTime = microtime(true);
|
||||
|
||||
$this->getAllRowsForFile('attack_quadratic_blowup.xlsx');
|
||||
@@ -675,13 +692,29 @@ class ReaderTest extends TestCase
|
||||
$allRows = $this->getAllRowsForFile('sheet_with_empty_cells.xlsx');
|
||||
|
||||
$expectedRows = [
|
||||
['A', 'B', 'C'],
|
||||
['A', '', 'C'],
|
||||
['0', '', ''],
|
||||
['1', '1', ''],
|
||||
];
|
||||
$this->assertEquals($expectedRows, $allRows, 'There should be 3 rows, with equal length');
|
||||
}
|
||||
|
||||
/**
|
||||
* https://github.com/box/spout/issues/184
|
||||
* @return void
|
||||
*/
|
||||
public function testReadShouldCreateOutputEmptyCellPreservedWhenNoDimensionsSpecified()
|
||||
{
|
||||
$allRows = $this->getAllRowsForFile('sheet_with_empty_cells_without_dimensions.xlsx');
|
||||
|
||||
$expectedRows = [
|
||||
['A', '', 'C'],
|
||||
['0'],
|
||||
['1', '1'],
|
||||
];
|
||||
$this->assertEquals($expectedRows, $allRows);
|
||||
}
|
||||
|
||||
/**
|
||||
* https://github.com/box/spout/issues/195
|
||||
* @return void
|
||||
@@ -699,6 +732,18 @@ class ReaderTest extends TestCase
|
||||
$this->assertEquals($expectedRows, $allRows, 'Cell values should not be trimmed');
|
||||
}
|
||||
|
||||
/**
|
||||
* https://github.com/box/spout/issues/726
|
||||
* @return void
|
||||
*/
|
||||
public function testReaderShouldSupportStrictOOXML()
|
||||
{
|
||||
$allRows = $this->getAllRowsForFile('sheet_with_strict_ooxml.xlsx');
|
||||
|
||||
$this->assertEquals('UNIQUE_ACCOUNT_IDENTIFIER', $allRows[0][0]);
|
||||
$this->assertEquals('A2Z34NJA7N2ESJ', $allRows[1][0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fileName
|
||||
* @param bool $shouldFormatDates
|
||||
|
||||
Reference in new issue
Block a user