File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 9
9
use Laravel \Fortify \Events \TwoFactorAuthenticationDisabled ;
10
10
use Laravel \Fortify \Events \TwoFactorAuthenticationEnabled ;
11
11
use Laravel \Fortify \TwoFactorAuthenticatable ;
12
- use Orchestra \Testbench \Attributes \DefineDatabase ;
12
+ use Orchestra \Testbench \Attributes \DefineEnvironment ;
13
+ use Orchestra \Testbench \Attributes \ResetRefreshDatabaseState ;
13
14
use Orchestra \Testbench \Attributes \WithMigration ;
14
15
use PragmaRX \Google2FA \Google2FA ;
15
16
@@ -65,7 +66,8 @@ public function test_two_factor_authentication_secret_key_can_be_retrieved()
65
66
$ this ->assertEquals ('foo ' , $ response ->original ['secretKey ' ]);
66
67
}
67
68
68
- #[DefineDatabase('withConfirmedTwoFactorAuthentication ' , defer: false )]
69
+ #[DefineEnvironment('withConfirmedTwoFactorAuthentication ' )]
70
+ #[ResetRefreshDatabaseState]
69
71
public function test_two_factor_authentication_can_be_confirmed ()
70
72
{
71
73
Event::fake ();
@@ -101,7 +103,8 @@ public function test_two_factor_authentication_can_be_confirmed()
101
103
$ this ->assertFalse ($ user ->hasEnabledTwoFactorAuthentication ());
102
104
}
103
105
104
- #[DefineDatabase('withConfirmedTwoFactorAuthentication ' , defer: false )]
106
+ #[DefineEnvironment('withConfirmedTwoFactorAuthentication ' )]
107
+ #[ResetRefreshDatabaseState]
105
108
public function test_two_factor_authentication_can_not_be_confirmed_with_invalid_code ()
106
109
{
107
110
Event::fake ();
You can’t perform that action at this time.
0 commit comments