p5-Test-Mock-LWP-Dispatch-0.08.txz


Advertisement

Description

p5-Test-Mock-LWP-Dispatch - Mocks LWP::UserAgent and dispatches your requests/responses

Property Value
Distribution FreeBSD 12
Repository FreeBSD Ports Latest amd64
Package filename p5-Test-Mock-LWP-Dispatch-0.08.txz
Package name p5-Test-Mock-LWP-Dispatch
Package version 0.08
Package release -
Package architecture amd64
Package type txz
Category devel perl5
Homepage https://metacpan.org/release/Test-Mock-LWP-Dispatch
License GPLv1+, ART10
Maintainer sunpoet@FreeBSD.org
Download size 9.75 KB
Installed size 18.95 KB
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.
WWW: https://metacpan.org/release/Test-Mock-LWP-Dispatch

Alternatives

Package Version Architecture Repository
p5-Test-Mock-LWP-Dispatch-0.08.txz 0.08 i386 FreeBSD Ports Latest
p5-Test-Mock-LWP-Dispatch-0.08.txz 0.08 amd64 FreeBSD Ports Quarterly
p5-Test-Mock-LWP-Dispatch-0.08.txz 0.08 i386 FreeBSD Ports Quarterly
p5-Test-Mock-LWP-Dispatch - - -

Requires

Name Value
p5-HTTP-Message = 6.18
p5-Test-MockObject = 1.20150527_1
p5-libwww = 6.38
perl5 = 5.28.1_1

Download

Type URL
Mirror pkg.freebsd.org
Binary Package p5-Test-Mock-LWP-Dispatch-0.08.txz
Source Package devel/p5-Test-Mock-LWP-Dispatch

Install Howto

Install p5-Test-Mock-LWP-Dispatch txz package:

# pkg install p5-Test-Mock-LWP-Dispatch

See Also

Package Description
p5-Test-Mock-Redis-0.21.txz Use in place of Redis for unit testing
p5-Test-MockDateTime-0.02.txz Mock DateTime->now calls during tests
p5-Test-MockModule-0.16.txz Override subroutines in a module for unit testing
p5-Test-MockObject-1.20150527_1.txz Tests remote URLs or local web files
p5-Test-MockRandom-1.01_1.txz Replaces random number generation with non-random number generation
p5-Test-MockTime-0.17.txz Replaces actual time with simulated time
p5-Test-Modern-0.013.txz Precision testing for modern perl
p5-Test-Module-Used-0.2.3_3.txz Test required module is really used and vice versa
p5-Test-Moose-More-0.050.txz More tools for testing Moose packages
p5-Test-More-UTF8-0.04_1.txz Enhancing Test::More for UTF-8-based projects
p5-Test-Most-0.35.txz Perl extension for most commonly needed test functions and features
p5-Test-Name-FromLine-0.13_1.txz Perl extension to fill test names from caller line
p5-Test-Needs-0.002006.txz Skip tests when modules not available
p5-Test-Net-LDAP-0.07.txz Perl extension of Net::LDAP subclass for testing
p5-Test-Net-RabbitMQ-0.13.txz Perl mock RabbitMQ implementation for use when testing
Advertisement
Advertisement