i have been trying to develop a phpunit test script to enable me test a controller that receives form data (input , file uploads).
This is the sample test script
$this->post('/api/v1/professionals', ['first_name'=>'Hack George', 'file'=>'c:\g.jpg'])
->seeJsonEquals([
'status' => 'success',
]);
When testing i observed that the service at '/api/v1/professionals' dooes not see the request object and states PHP Fatal error: Call to a member function getFilename() on null . null being the request object on the service