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

be() public method

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