I\'m trying to run this functional test on my laravel controller. I would like to test image processing, but to do so I want to fake image uploading. How do I do this? I fou
With phpunit you can attach a file to a form by using attach() method.
Example from lumen docs:
public function testPhotoCanBeUploaded() { $this->visit('/upload') ->name('File Name', 'name') ->attach($absolutePathToFile, 'photo') ->press('Upload') ->see('Upload Successful!'); }