Excuses if this might be a duplicate, but I am not sure how to achieve the following. I am using phpunit to do some tests on routes in laravel and I am not able to receive any debugging information on why the route failed.
This is the code I am trying to test which simply calls some named routes:
foreach($companyNames as $companyName){
$response = $this->call('GET', Config::get('app.url') . '/provider/' . $companyName);
$response->assertStatus(200);
}
The response I get from this when the assertStatus fails is:
1) Tests\Unit\ProviderPageRouteTest::testProviderPageRoutes
Expected status code 200 but received 404.
Failed asserting that false is true.
But what I want to see now is what route exactly failed so I can investigate the reason for the failed route. How can I receive this information from the response or request?