[Catalyst-commits] r8114 - in Catalyst-Runtime/5.70/trunk: .
lib/Catalyst
bricas at dev.catalyst.perl.org
bricas at dev.catalyst.perl.org
Mon Jul 14 19:20:12 BST 2008
Author: bricas
Date: 2008-07-14 19:20:11 +0100 (Mon, 14 Jul 2008)
New Revision: 8114
Modified:
Catalyst-Runtime/5.70/trunk/Changes
Catalyst-Runtime/5.70/trunk/lib/Catalyst/Test.pm
Log:
Updated Catalyst::Test docs to mention the use of HTTP::Request objects (Rafael Kitover)
Modified: Catalyst-Runtime/5.70/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.70/trunk/Changes 2008-07-13 19:46:34 UTC (rev 8113)
+++ Catalyst-Runtime/5.70/trunk/Changes 2008-07-14 18:20:11 UTC (rev 8114)
@@ -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
Modified: Catalyst-Runtime/5.70/trunk/lib/Catalyst/Test.pm
===================================================================
--- Catalyst-Runtime/5.70/trunk/lib/Catalyst/Test.pm 2008-07-13 19:46:34 UTC (rev 8113)
+++ Catalyst-Runtime/5.70/trunk/lib/Catalyst/Test.pm 2008-07-14 18:20:11 UTC (rev 8114)
@@ -21,6 +21,12 @@
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,8 +51,14 @@
=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<HTTP::Request::AsCGI> or remotely if you define the CATALYST_SERVER
+environment variable.
+The </get> and </request> functions take either a URI or an L<HTTP::Request>
+object.
+
=head2 METHODS
=head2 get
@@ -104,6 +116,8 @@
=head2 local_request
+Simulate a request using L<HTTP::Request::AsCGI>.
+
=cut
sub local_request {
@@ -183,7 +197,8 @@
=head1 SEE ALSO
-L<Catalyst>
+L<Catalyst>, L<Test::WWW::Mechanize::Catalyst>,
+L<Test::WWW::Selenium::Catalyst>, L<Test::More>, L<HTTP::Request::Common>
=head1 AUTHORS
More information about the Catalyst-commits
mailing list