X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FEngine%2FRequest%2FURI.pm;h=9b30152d4d346c10f571b0f2b4172ec339afc266;hp=3d407801d3ed33745f90062441b6745161acb8b4;hb=88e5a8b0c4d28e46b8ba6b6b9567063e57af9063;hpb=9868e0a0023cc8b598d60f150ea367e0056a65f3 diff --git a/t/lib/TestApp/Controller/Engine/Request/URI.pm b/t/lib/TestApp/Controller/Engine/Request/URI.pm index 3d40780..9b30152 100644 --- a/t/lib/TestApp/Controller/Engine/Request/URI.pm +++ b/t/lib/TestApp/Controller/Engine/Request/URI.pm @@ -5,26 +5,26 @@ use base 'Catalyst::Controller'; sub default : Private { my ( $self, $c ) = @_; - + $c->forward('TestApp::View::Dump::Request'); } sub change_path : Local { my ( $self, $c ) = @_; - + # change the path $c->req->path( '/my/app/lives/here' ); - + $c->forward('TestApp::View::Dump::Request'); } sub change_base : Local { my ( $self, $c ) = @_; - + # change the base and uri paths $c->req->base->path( '/new/location' ); $c->req->uri->path( '/new/location/engine/request/uri/change_base' ); - + $c->forward('TestApp::View::Dump::Request'); } @@ -34,12 +34,12 @@ sub uri_with : Local { # change the current uri my $uri = $c->req->uri_with( { b => 1, c => undef } ); my %query = $uri->query_form; - + $c->res->header( 'X-Catalyst-Param-a' => $query{ a } ); $c->res->header( 'X-Catalyst-Param-b' => $query{ b } ); $c->res->header( 'X-Catalyst-Param-c' => exists($query{ c }) ? $query{ c } : '--notexists--' ); $c->res->header( 'X-Catalyst-query' => $uri->query); - + $c->forward('TestApp::View::Dump::Request'); } @@ -48,9 +48,9 @@ sub uri_with_object : Local { my $uri = $c->req->uri_with( { a => $c->req->base } ); my %query = $uri->query_form; - + $c->res->header( 'X-Catalyst-Param-a' => $query{ a } ); - + $c->forward('TestApp::View::Dump::Request'); } @@ -59,9 +59,9 @@ sub uri_with_utf8 : Local { # change the current uri my $uri = $c->req->uri_with( { unicode => "\x{2620}" } ); - + $c->res->header( 'X-Catalyst-uri-with' => "$uri" ); - + $c->forward('TestApp::View::Dump::Request'); } @@ -73,9 +73,9 @@ sub uri_with_undef : Local { # change the current uri my $uri = $c->req->uri_with( { foo => undef } ); - + $c->res->header( 'X-Catalyst-warnings' => $warnings ); - + $c->forward('TestApp::View::Dump::Request'); } @@ -83,7 +83,7 @@ sub uri_with_undef_only : Local { my ( $self, $c ) = @_; my $uri = $c->req->uri_with( { a => undef } ); - + $c->res->header( 'X-Catalyst-uri-with' => "$uri" ); $c->forward('TestApp::View::Dump::Request'); } @@ -92,7 +92,7 @@ sub uri_with_undef_ignore : Local { my ( $self, $c ) = @_; my $uri = $c->req->uri_with( { a => 1, b => undef } ); - + my %query = $uri->query_form; $c->res->header( 'X-Catalyst-uri-with' => "$uri" ); $c->res->header( 'X-Catalyst-Param-a' => $query{ a } );