X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FTest.pm;h=9e0db012c10a40194eae90d8e9d02a2820017109;hp=82a43c13c5949f384bd717a5f3c8889a7add0711;hb=2f3812528068bc1d9f7840067f0c03d36cd47e6d;hpb=afb82794328ff8da1efc0a4c37f3f3703c262c31 diff --git a/lib/Catalyst/Test.pm b/lib/Catalyst/Test.pm index 82a43c1..9e0db01 100644 --- a/lib/Catalyst/Test.pm +++ b/lib/Catalyst/Test.pm @@ -21,6 +21,12 @@ Catalyst::Test - Test Catalyst Applications request('index.html'); get('index.html'); + use HTTP::Request::Common; + my $response = request POST '/foo', [ + bar => 'baz', + something => 'else' + ]; + # Run tests against a remote server CATALYST_SERVER='http://localhost:3000/' prove -r -l lib/ t/ @@ -45,7 +51,13 @@ Catalyst::Test - Test Catalyst Applications =head1 DESCRIPTION -Test Catalyst Applications. +This module allows you to make requests to a Catalyst application either without +a server, by simulating the environment of an HTTP request using +L or remotely if you define the CATALYST_SERVER +environment variable. + +The and functions take either a URI or an L +object. =head2 METHODS @@ -104,6 +116,8 @@ sub import { =head2 local_request +Simulate a request using L. + =cut sub local_request { @@ -183,11 +197,12 @@ sub remote_request { =head1 SEE ALSO -L. +L, L, +L, L, L -=head1 AUTHOR +=head1 AUTHORS -Sebastian Riedel, C +Catalyst Contributors, see Catalyst.pm =head1 COPYRIGHT