Why are you disabling exception handling?
Try removing this
$this->withoutExceptionHandling();
I'm follow this series https://laracasts.com/series/build-a-laravel-app-with-tdd .
I got the following error:
Tests\Feature\ProjectsTest::a_user_can_create_a_project Illuminate\Session\TokenMismatchException: CSRF token mismatch.
/** @test */
public function a_user_can_create_a_project()
{
$this->withoutExceptionHandling();
$this->actingAs(factory('App\User')->create());
$attributes = [
'title' => $this->faker->sentence,
'description' => $this->faker->paragraph,
];
$this->post('projects', $attributes)->assertRedirect('projects');
$this->assertDatabaseHas('projects', $attributes);
$this->get('projects')->assertSee($attributes['title']);
}
Please or to participate in this conversation.