Add urlencode helper to test lib

This commit is contained in:
Maxime Besson 2020-11-16 18:37:12 +01:00
parent ad4a79e9de
commit 4ceb75c970

View File

@ -59,6 +59,7 @@ use File::Find;
use LWP::UserAgent;
use Time::Fake;
use URI::Escape;
use MIME::Base64;
use Lemonldap::NG::Common::FormEncode;
#use 5.10.0;
@ -569,6 +570,17 @@ sub switch {
};
}
=head4 encodeUrl( $url );
Encode URL like the handler would, see ::Handler::Main
=cut
sub encodeUrl {
my ($url) = @_;
return uri_escape( encode_base64( $url, '' ) );
}
=head2 LLNG::Manager::Test Class
=cut