@martin88 I would look into Storage::fake() and UploadedFile::fake().
In my tests where I expect images or uploads, I either store a fake uploaded file or when testing http directly, upload a fake file (works great to test validations as well)
Example
/** @test */
public function it_removes_image_from_disk()
{
Messenger::setProvider($this->tippin);
Storage::fake('public');
$directory = Messenger::getAvatarStorage('directory').'/user/'.$this->tippin->getKey();
UploadedFile::fake()->image('avatar.jpg')->storeAs($directory, 'avatar.jpg', [
'disk' => 'public',
]);
app(DestroyMessengerAvatar::class)->execute();
Storage::disk('public')->assertMissing($directory.'/avatar.jpg');
}
Edit: Side note, if you actually need to test against real files, you can use your setup or teardown methods to unlink() stored files, or, the built in storage/file facades to delete directories.