tariqbilal's avatar

Uploadfile error while unit testing

I am facing an error while running the unit tests of a client project. This has been started after I upgraded from laravel 5.8 to Laravel 8.

In the Unit test PDF FIle upload causes error

Function is the default UploadFile.

After running the test it shows.

local.ERROR: attempt to perform an operation not allowed by the security policy PDF' @ error/constitute.c/IsCoderAuthorized/408 {"userId":2058,"exception":"[object] (ImagickException(code: 499): attempt to perform an operation not allowed by the security policy PDF' @ error/constitute.c/IsCoderAuthorized/408 at /code/vendor/spatie/pdf-to-image/src/Pdf.php:40)

The tests used to work before but now they are breaking up I am using laradock for the test environment and I am unsure about the issue.

0 likes
2 replies
tariqbilal's avatar

@tykus Thanks, seems like policy was not modified properly inside my docker container.

Please or to participate in this conversation.