Shared strings table without uniqueCount and count should work (#269)
Use file based strategy in this case
This commit is contained in:
1 parent
ffea8871a6
commit
a8eb7ad39c
5 files changed
+26
-6
No files matched your search
@@ -15,6 +15,7 @@ class CachingStrategyFactoryTest extends \PHPUnit_Framework_TestCase
|
||||
public function dataProviderForTestGetBestCachingStrategy()
|
||||
{
|
||||
return [
|
||||
[null, -1, 'FileBasedStrategy'],
|
||||
[CachingStrategyFactory::MAX_NUM_STRINGS_PER_TEMP_FILE, -1, 'FileBasedStrategy'],
|
||||
[CachingStrategyFactory::MAX_NUM_STRINGS_PER_TEMP_FILE + 10, -1, 'FileBasedStrategy'],
|
||||
[CachingStrategyFactory::MAX_NUM_STRINGS_PER_TEMP_FILE - 10, -1, 'InMemoryStrategy'],
|
||||
@@ -27,7 +28,7 @@ class CachingStrategyFactoryTest extends \PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* @dataProvider dataProviderForTestGetBestCachingStrategy
|
||||
*
|
||||
* @param int $sharedStringsUniqueCount
|
||||
* @param int|null $sharedStringsUniqueCount
|
||||
* @param int $memoryLimitInKB
|
||||
* @param string $expectedStrategyClassName
|
||||
* @return void
|
||||
|
||||
@@ -126,6 +126,20 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($expectedRows, $allRows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testReadShouldSupportSheetWithSharedStringsMissingUniqueCountAndCountAttributes()
|
||||
{
|
||||
$allRows = $this->getAllRowsForFile('one_sheet_with_shared_strings_missing_unique_count_and_count.xlsx');
|
||||
|
||||
$expectedRows = [
|
||||
['s1--A1', 's1--B1'],
|
||||
['s1--A2', 's1--B2'],
|
||||
];
|
||||
$this->assertEquals($expectedRows, $allRows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
|
||||
BIN
Binary file not shown.
Reference in new issue
Block a user