Testing file related features in Laravel

  laravel, php, phpunit, unit-testing

I know the basics of unit testing, but i’m struggling to find information on how I am supposed to set up a ‘testing environment’ with artificially placed files to test a certain workflow.

To be more specific i have a file ingestion workflow developed and I would like to create "test scenarios" when I run php artisan test – create the folders, pull some test files into them and assert test cases for the workflow to be tested. I don’t have continous integration processes set up that would automatically branch off and do this kind of stuff, for now I am just running tests manually during development, but I’m not sure if there is an "init" function for a given uni test where I could artificially set up the rest of the tests?

Thanks

Source: Laravel

Leave a Reply