Laravel\Lumen\Testing\TestCase::be PHP Method

be() public method

Set the currently logged in user for the application.
public be ( Illuminate\Contracts\Auth\Authenticatable $user, string | null $driver = null ) : void
$user Illuminate\Contracts\Auth\Authenticatable
$driver string | null
return void
    public function be(Authenticatable $user, $driver = null)
    {
        $this->app['auth']->guard($driver)->setUser($user);
    }