X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FTest.pm;h=8776803e7d70a8d0c518a49e170fc528a11c6ce9;hb=12755afcb3cde2d52091b9e7c664b1a7a9bb2d62;hp=3b319ed2b23d1e518d65af94244acea349906dfe;hpb=94f74acdfa62a94db80eb08f12078f0e0d513fc3;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Test.pm b/lib/Catalyst/Test.pm index 3b319ed..8776803 100644 --- a/lib/Catalyst/Test.pm +++ b/lib/Catalyst/Test.pm @@ -156,8 +156,8 @@ L or remotely if you define the CATALYST_SERVER environment variable. This module also adds a few Catalyst-specific testing methods as displayed in the method section. -The L and L functions take either a URI or an L -object. +The L and L +functions take either a URI or an L object. =head1 INLINE TESTS WILL NO LONGER WORK @@ -187,7 +187,7 @@ Returns the content. Note that this method doesn't follow redirects, so to test for a correctly redirecting page you'll need to use a combination of this -method and the L method below: +method and the L method below: my $res = request('/'); # redirects to /y warn $res->header('location'); @@ -208,7 +208,7 @@ header configuration; currently only supports setting 'host' value. =head2 ($res, $c) = ctx_request( ... ); -Works exactly like L, except it also returns the Catalyst context object, +Works exactly like L, except it also returns the Catalyst context object, C<$c>. Note that this only works for local requests. =head2 $res = Catalyst::Test::local_request( $AppClass, $url ); @@ -228,7 +228,9 @@ sub local_request { $class->handle_request( env => \%ENV ); - return $cgi->restore->response; + my $response = $cgi->restore->response; + $response->request( $request ); + return $response; } my $agent;