Fix: Limit readers to excel when testing content

This commit is contained in:
philipp lang 2024-07-15 23:31:09 +02:00
parent b20d05398b
commit 8aefd17b06
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ trait TestsExcelDocuments
{ {
$filename = sys_get_temp_dir() . '/' . str()->uuid()->toString(); $filename = sys_get_temp_dir() . '/' . str()->uuid()->toString();
file_put_contents($filename, $content); file_put_contents($filename, $content);
$spreadsheet = IOFactory::load($filename); $spreadsheet = IOFactory::load($filename, 0, [IOFactory::READER_XLSX]);
$writer = new Csv($spreadsheet); $writer = new Csv($spreadsheet);
$writer->save($filename); $writer->save($filename);
$spreadsheet->disconnectWorksheets(); $spreadsheet->disconnectWorksheets();