From 50a3c6df900cf0d67d9dd993500e8e41c3ba6649 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Mon, 15 Jul 2024 23:24:10 +0200 Subject: [PATCH] Add test for excel document content --- src/TestsExcelDocuments.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/TestsExcelDocuments.php diff --git a/src/TestsExcelDocuments.php b/src/TestsExcelDocuments.php new file mode 100644 index 0000000..e1a2cd2 --- /dev/null +++ b/src/TestsExcelDocuments.php @@ -0,0 +1,23 @@ +uuid()->toString(); + file_put_contents($filename, $content); + $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($filename); + $writer = new Csv($spreadsheet); + $writer->save($filename); + $spreadsheet->disconnectWorksheets(); + $contents = file_get_contents($filename); + unlink($filename); + Assert::assertStringContainsString($should, $contents); + } +}