Closed maglor closed 5 years ago
This is happening because the files
parameter passed to the call
method in the post
call is hardcoded as an empty array.
Thanks! It's work for me
$this->call('POST', route('image_store'), [], [], ['image' => $file], []);
Thanks! It's work for me
$this->call('POST', route('image_store'), [], [], ['image' => $file], []);
For me not working (
Description:
HTTP file upload fails in tests like https://laravel.com/docs/5.7/http-tests#testing-file-uploads
$request->file('image')->isValid();
fails withCall to a member function isValid() on null
but$request->file('image')
is instanse ofIlluminate\Http\Testing\File
Steps To Reproduce:
TestCase:
ImageController: