Skip to content

Commit 8598778

Browse files
Add actingAsGuest method for clearing actingAs calls
1 parent 6801be8 commit 8598778

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Authentication.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ function actingAs(Authenticatable $user, ?string $driver = null)
1717
return test()->actingAs(...func_get_args());
1818
}
1919

20+
/**
21+
* Clear the currently logged in user for the application.
22+
*
23+
* @return TestCase
24+
*/
25+
function actingAsGuest(?string $guard = null)
26+
{
27+
return test()->actingAsGuest(...func_get_args());
28+
}
29+
2030
/**
2131
* Set the currently logged in user for the application.
2232
*

0 commit comments

Comments
 (0)