Name : perl-Test-Mock-LWP-Dispatch
| |
Version : 0.08
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.1.1
| Date : 2023-01-27 17:39:47
|
Group : Development/Libraries/Perl
| Source RPM : perl-Test-Mock-LWP-Dispatch-0.08-lp154.1.1.src.rpm
|
Size : 0.03 MB
| |
Packager : https://www_suse_com/
| |
Summary : mocks LWP::UserAgent and dispatches your requests/responses
|
Description :
This module is intended for testing a code that heavily uses LWP::UserAgent.
Assume that a function you want to test makes three different requests to a server and expects to get some content from the server. To test this function you should setup request/response mappings for mocked UserAgent and test it.
For doing something with mappings, here are methods \'map\', \'unmap\' and \'unmap_all\'. For controlling context of these mappings (whether it applies to all LWP::UserAgent-s created in your code or only to a specific one) you need to call these functions for exported \'$mock_ua\' object (global mapping) or for newly created LWP::UserAgent (local mappings).
See also Test::Mock::LWP, it provides mocked LWP objects for you, so probably you can solve your problems with that module too.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-T/15.4/noarch |