4
4
5
5
use App \Models \User ;
6
6
use Illuminate \Foundation \Testing \RefreshDatabase ;
7
- use Illuminate \Support \Facades \RateLimiter ;
8
7
use Laravel \Fortify \Features ;
9
8
use Livewire \Volt \Volt ;
10
9
use Tests \TestCase ;
@@ -15,7 +14,7 @@ class TwoFactorChallengeTest extends TestCase
15
14
16
15
public function test_two_factor_challenge_redirects_when_not_authenticated (): void
17
16
{
18
- if (!Features::canManageTwoFactorAuthentication ()) {
17
+ if (! Features::canManageTwoFactorAuthentication ()) {
19
18
$ this ->markTestSkipped ('Two-factor authentication is not enabled. ' );
20
19
}
21
20
@@ -26,7 +25,7 @@ public function test_two_factor_challenge_redirects_when_not_authenticated(): vo
26
25
27
26
public function test_two_factor_challenge_renders_correct_livewire_component (): void
28
27
{
29
- if (!Features::canManageTwoFactorAuthentication ()) {
28
+ if (! Features::canManageTwoFactorAuthentication ()) {
30
29
$ this ->markTestSkipped ('Two-factor authentication is not enabled. ' );
31
30
}
32
31
@@ -53,7 +52,7 @@ public function test_two_factor_challenge_renders_correct_livewire_component():
53
52
54
53
public function test_two_factor_authentication_is_rate_limited (): void
55
54
{
56
- if (!Features::enabled (Features::twoFactorAuthentication ())) {
55
+ if (! Features::enabled (Features::twoFactorAuthentication ())) {
57
56
$ this ->markTestSkipped ('Two-factor authentication is not enabled. ' );
58
57
}
59
58
@@ -70,7 +69,7 @@ public function test_two_factor_authentication_is_rate_limited(): void
70
69
'two_factor_confirmed_at ' => now (),
71
70
])->save ();
72
71
73
- collect (range (1 , 5 ))->each (function () use ( $ user ) {
72
+ collect (range (1 , 5 ))->each (function () {
74
73
$ this ->post (route ('two-factor.login.store ' ), ['code ' => '21212 ' ])
75
74
->assertRedirect (route ('two-factor.login ' ))
76
75
->assertSessionHasErrors ('code ' );
0 commit comments