44
55use App \Models \User ;
66use Illuminate \Foundation \Testing \RefreshDatabase ;
7- use Illuminate \Support \Facades \RateLimiter ;
87use Laravel \Fortify \Features ;
98use Livewire \Volt \Volt ;
109use Tests \TestCase ;
@@ -15,7 +14,7 @@ class TwoFactorChallengeTest extends TestCase
1514
1615 public function test_two_factor_challenge_redirects_when_not_authenticated (): void
1716 {
18- if (!Features::canManageTwoFactorAuthentication ()) {
17+ if (! Features::canManageTwoFactorAuthentication ()) {
1918 $ this ->markTestSkipped ('Two-factor authentication is not enabled. ' );
2019 }
2120
@@ -26,7 +25,7 @@ public function test_two_factor_challenge_redirects_when_not_authenticated(): vo
2625
2726 public function test_two_factor_challenge_renders_correct_livewire_component (): void
2827 {
29- if (!Features::canManageTwoFactorAuthentication ()) {
28+ if (! Features::canManageTwoFactorAuthentication ()) {
3029 $ this ->markTestSkipped ('Two-factor authentication is not enabled. ' );
3130 }
3231
@@ -53,7 +52,7 @@ public function test_two_factor_challenge_renders_correct_livewire_component():
5352
5453 public function test_two_factor_authentication_is_rate_limited (): void
5554 {
56- if (!Features::enabled (Features::twoFactorAuthentication ())) {
55+ if (! Features::enabled (Features::twoFactorAuthentication ())) {
5756 $ this ->markTestSkipped ('Two-factor authentication is not enabled. ' );
5857 }
5958
@@ -70,7 +69,7 @@ public function test_two_factor_authentication_is_rate_limited(): void
7069 'two_factor_confirmed_at ' => now (),
7170 ])->save ();
7271
73- collect (range (1 , 5 ))->each (function () use ( $ user ) {
72+ collect (range (1 , 5 ))->each (function () {
7473 $ this ->post (route ('two-factor.login.store ' ), ['code ' => '21212 ' ])
7574 ->assertRedirect (route ('two-factor.login ' ))
7675 ->assertSessionHasErrors ('code ' );
0 commit comments