The Illuminate\Testing\TestResponse::assertSessionHasNoErrors()
isn't working as I would expect it to.
I have something like this in my code:
$response = $this->post('account/project/create', $array);
$response->assertStatus(200); // FAILS
$response->assertStatus(500); // PASSES
$response->assertSessionHasErrors(); // FAILS
$response->assertSessionHasNoErrors(); // PASSES
As you can see, the POST
returns a 500
, but assertSessionHasErrors
does not fail. I would expect it to fail and return the exception message. I do not want to skip over exceptions by using $this->withoutExceptionHandling()
.