Summer Sale! All accounts are 50% off this week.

Mick79's avatar

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?

0 likes
0 replies

Please or to participate in this conversation.