Name : perl-Test-Mock-LWP-Dispatch
| |
Version : 0.80.0
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp156.1.1
| Date : 2024-08-02 23:01:59
|
Group : Unspecified
| Source RPM : perl-Test-Mock-LWP-Dispatch-0.80.0-lp156.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/15.6/noarch |