I am using this is a Form service.
$files = Input::file(\'my_file\');
I\'m trying to test it, but I can\'t seem to properly mock Input. The
Apparently, I was wrong. This does work. It does help to have it in the right test.
$mockInput = Mockery::mock('\Illuminate\Http\Request');
$mockInput->shouldReceive('file')->andReturn($my_test_data);
Input::swap($mockInput);
Also, I created an UploadedFile object and andReturned it:
$media = new \Symfony\Component\HttpFoundation\File\UploadedFile(
$path,
'orig_name_1.jpg'
);
$my_test_data = [0 => $media];