From: Brian Cassidy Date: Mon, 14 Jul 2008 18:20:11 +0000 (+0000) Subject: Updated Catalyst::Test docs to mention the use of HTTP::Request objects (Rafael Kitover) X-Git-Tag: 5.7099_04~50 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=7ef5818048f086b75820c5745db636d4bbb73e3b Updated Catalyst::Test docs to mention the use of HTTP::Request objects (Rafael Kitover) --- diff --git a/Changes b/Changes index 6d0858a..548c4e7 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,8 @@ 5.7XXXX XXXX - Added PathPrefix attribute - Removed Catalyst::Build; we've long since moved to Module::Install + - Updated Catalyst::Test docs to mention the use of HTTP::Request + objects (Rafael Kitover) 5.7099_01 2008-06-25 22:36:00 - Refactored component resolution (component(), models(), model(), et al). We now diff --git a/lib/Catalyst/Test.pm b/lib/Catalyst/Test.pm index f77f5f1..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,7 +197,8 @@ sub remote_request { =head1 SEE ALSO -L +L, L, +L, L, L =head1 AUTHORS