Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
mocks LWP::UserAgent and dispatches your requests/responses
Perl
Branch: master
Pull request Compare This branch is 14 commits behind tadam:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/Test/Mock/LWP
t
.gitignore
Build.PL
Changes
MANIFEST
MANIFEST.SKIP
README

README

NAME
       Test::Mock::LWP::Dispatch − mocks LWP::UserAgent and dispatches your
       requests/responses

SYNOPSIS
         # in your *.t
         use Test::Mock::LWP::Dispatch;
         use HTTP::Response;

         # global mappings for requests and responses for LWP::UserAgent
         $mock_ua‐>map(’http://example.com’, HTTP::Response‐>new(...));
         # or
         $mock_ua‐>map(qr!^http://example.com/page!, sub { my $request = shift;
                                                           # ... create $response
                                                           return $response; });

         # or make local mappings
         my $ua = LWP::UserAgent‐>new;
         $ua‐>map(...);

DESCRIPTION
       See Test::Mock::LWP::Dispatch POD documentation.

AUTHORS
       Yury Zavarin "yury.zavarin@gmail.com".

LICENSE
       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

SEE ALSO
       http://github.com/tadam/Test−Mock−LWP−Dispatch
       Test::Mock::LWP
       LWP::UserAgent
Something went wrong with that request. Please try again.