Nov 6, 2022
0
Level 5
Segmentation Fault running tests
I have been getting a segmentation fault when running PHPUnit.
I ran it with --debug and found that it bugs out during my login with correct details test. Here is the test:
public function test_user_can_login_with_correct_credentials()
{
// I can Log::Debug here and it works
$user = User::factory()->create([
'password' => bcrypt($password = 'i-love-laravel'),
]);
// I Log::Debug here and it does not work
$response = $this->post('/login', [
'email' => $user->email,
'password' => $password,
]);
$response->assertRedirect('/dashboard');
$this->assertAuthenticatedAs($user);
}
Any ideas?
Please or to participate in this conversation.