I have turned throw Exception in handler.php so that I can catch exceptions and see the errors but what happened is when I try to do the validation checks it throws me an exception which is correct but in my test case instead of catching the exception i'm asserting that the session has errors.
/** @test*/
public function a_thread_requires_a_title(){
$thread = make('App\Thread', ['title'=> null]);
$this->post('threads', $thread->toArray())
->assertSessionHasErrors('title');
}
Since, validation error is an exception so it throws me an exception because I've modified the handler.php file as
if(app()->environment() === "testing") throw $exception;
so, what I'm trying to do is change the env for this one test so that it wont throw me an 'Exception'
$this->withoutExceptionHandling();