markTestSkipped('Two-factor authentication is not enabled.'); } $response = $this->get(route('two-factor.login')); $response->assertRedirect(route('login')); }); test('two factor challenge can be rendered', function () { if (! Features::canManageTwoFactorAuthentication()) { $this->markTestSkipped('Two-factor authentication is not enabled.'); } Features::twoFactorAuthentication([ 'confirm' => true, 'confirmPassword' => true, ]); $user = User::factory()->create(); $this->post(route('login.store'), [ 'email' => $user->email, 'password' => 'password', ])->assertRedirect(route('two-factor.login')); });