Background: I have created a test class, which worked fine in laravel 5.1; but doesn't in laravel 5.2. This is because the "test" parameter for the file is lost.
I use a code below to create file request:
$this->dataFile = new \Symfony\Component\HttpFoundation\File\UploadedFile(
base_path('tests/files/datafiles/A.csv'), 'A.csv', 'text/csv', 13071, null, true
);
and I send it using $this->call()
$this->call('POST', '/uploadFile?token=' . $this->token, $params, [], ['file' => [$this->dataFile]], []);
The problem that I am having is that on receiving end the "test" parameters comes through us being false:
[0] => Illuminate\Http\UploadedFile Object
(
[test:Symfony\Component\HttpFoundation\File\UploadedFile:private] =>
[originalName:Symfony\Component\HttpFoundation\File\UploadedFile:private] => A.csv
[mimeType:Symfony\Component\HttpFoundation\File\UploadedFile:private] => text/csv
[size:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 13071
[error:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 0
[pathName:SplFileInfo:private] => D:\tests/files/datafiles/A.csv
[fileName:SplFileInfo:private] => A.csv
)