Skip to content

Commit 591ee15

Browse files
authored
wip
1 parent d184ed4 commit 591ee15

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/TwoFactorAuthenticationControllerTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
use Laravel\Fortify\Events\TwoFactorAuthenticationDisabled;
1010
use Laravel\Fortify\Events\TwoFactorAuthenticationEnabled;
1111
use Laravel\Fortify\TwoFactorAuthenticatable;
12-
use Orchestra\Testbench\Attributes\DefineDatabase;
12+
use Orchestra\Testbench\Attributes\DefineEnvironment;
13+
use Orchestra\Testbench\Attributes\ResetRefreshDatabaseState;
1314
use Orchestra\Testbench\Attributes\WithMigration;
1415
use PragmaRX\Google2FA\Google2FA;
1516

@@ -65,7 +66,8 @@ public function test_two_factor_authentication_secret_key_can_be_retrieved()
6566
$this->assertEquals('foo', $response->original['secretKey']);
6667
}
6768

68-
#[DefineDatabase('withConfirmedTwoFactorAuthentication', defer: false)]
69+
#[DefineEnvironment('withConfirmedTwoFactorAuthentication')]
70+
#[ResetRefreshDatabaseState]
6971
public function test_two_factor_authentication_can_be_confirmed()
7072
{
7173
Event::fake();
@@ -101,7 +103,8 @@ public function test_two_factor_authentication_can_be_confirmed()
101103
$this->assertFalse($user->hasEnabledTwoFactorAuthentication());
102104
}
103105

104-
#[DefineDatabase('withConfirmedTwoFactorAuthentication', defer: false)]
106+
#[DefineEnvironment('withConfirmedTwoFactorAuthentication')]
107+
#[ResetRefreshDatabaseState]
105108
public function test_two_factor_authentication_can_not_be_confirmed_with_invalid_code()
106109
{
107110
Event::fake();

0 commit comments

Comments
 (0)