Answer the question
In order to leave comments, you need to log in
Laravel + PHPUnit: how to submit a file in API tests?
hello fellow friends!
I found the following implementation in the description of laravel testing:
public function testApplication()
{
$response = $this->call('POST', '/url', ['param' => 'value']);
$this->assertEquals(200, $response->status());
}
Answer the question
In order to leave comments, you need to log in
https://laravel.com/docs/5.4/dusk#attaching-files
https://laravel.com/docs/5.4/http-tests#testing-fi...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question