devel/p5-Test-Mock-LWP-Dispatch 0.08 DragonFly
Mocks LWP::UserAgent and dispatches your requests/responses
- System
- DragonFly
- Repository
- DPorts
- Maintainer
- [email protected] (as in FreeBSD)
- License
- ART10, GPLv1+
- Categories
- devel, perl5
- Package size
- 13.5 KiB, 48.8 KiB installed
Description
Test::Mock::LWP::Dispatch intends for testing a code that heavily uses LWP::UserAgent.
Assume that function you want to test makes three different request to the 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 (is it applies for all created in your code LWP::UserAgent's or only to one specific?) you should call these functions for exported $mock_ua object (global mapping) or for newly created LWP::UserAgent (local mappings).
See also on Test::Mock::LWP, it provides mocked LWP objects for you, so probably you can solve your problems with this module too.
In the other systems
The newest version among them is 0.08, as upstream numbers it.
| System | Port | Version | Vulnerabilities | Status | Maintainer | Last update |
|---|---|---|---|---|---|---|
| DragonFly | devel/p5-Test-Mock-LWP-Dispatch | 0.08 newest | none known | - | [email protected] | - |
| FreeBSD | devel/p5-Test-Mock-LWP-Dispatch | 0.08 newest | none known | - | [email protected] | - |
| HardenedBSD | devel/p5-Test-Mock-LWP-Dispatch | 0.08 newest | no data | - | [email protected] | - |
| GhostBSD | devel/p5-Test-Mock-LWP-Dispatch | 0.08 newest | no data | - | [email protected] | - |
Install
Binary package:
pkg install p5-Test-Mock-LWP-Dispatch
From DPorts:
cd /usr/dports/devel/p5-Test-Mock-LWP-Dispatch && make install clean
Dependency graph
Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.
Dependencies
Run dependencies 4
No port depends on this one.