diff --git a/src/MediaCollections/Exceptions/FileNameNotAllowed.php b/src/MediaCollections/Exceptions/FileNameNotAllowed.php new file mode 100644 index 000000000..b770af5c7 --- /dev/null +++ b/src/MediaCollections/Exceptions/FileNameNotAllowed.php @@ -0,0 +1,13 @@ +defaultSanitizer('Scan-‎9‎.‎14‎.‎2022-‎7‎.‎23‎.‎28.pdf')) ->toEqual('Scan-9.14.2022-7.23.28.pdf'); }); + +it('will throw an exception if the sanitized file name is a php file name', function() { + $adder = app(FileAdder::class); + + $adder->defaultSanitizer('filename.php‎'); +})->throws(FileNameNotAllowed::class);