From dc20a8a75c75ceb3e7219dc4fed828007c9281f2 Mon Sep 17 00:00:00 2001 From: guillaume91 Date: Wed, 22 May 2024 14:00:21 +0200 Subject: [PATCH] Excel File Test --- .../Feature/ValidateExcelStructureTest.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 laravel_app/tests/Feature/ValidateExcelStructureTest.php diff --git a/laravel_app/tests/Feature/ValidateExcelStructureTest.php b/laravel_app/tests/Feature/ValidateExcelStructureTest.php new file mode 100644 index 0000000..4e1e246 --- /dev/null +++ b/laravel_app/tests/Feature/ValidateExcelStructureTest.php @@ -0,0 +1,40 @@ +toArray($filename); + self::assertNotNull($excelArray); + $headers = $excelArray[0][0]; + self::assertNotEmpty($headers); + self::assertEmpty(array_diff($toCheck, $headers)); + + }catch (NoTypeDetectedException $exception){ + self::assertFileExists('/Users/guillaume/smartcane/laravel_app/storage/app/livewire-tmp/gc4uIBw5Uli7Fk1JJDR9d7eLoPRI0x-metaWGluYXZhbmVfZGVtby5nZW9qc29u-.json'); + } + + } +}