laravel phpunit simulate a logged user code example
Example: current loggedin user laravel
$user = auth()->user(); print($user->id);print($user->name);print($user->email);
$user = auth()->user(); print($user->id);print($user->name);print($user->email);