X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FRoot.pm;h=b626bdb0554713e20f20d29b9bf48ce92b7b01ff;hb=9af4ee013b23e7241d4664ea39952fa3b20f4b7f;hp=fc88317f26e6d9979f28ad7ada9800c67a03332d;hpb=53119b7876049abfe0d4e4bea5e85724dd4778d7;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm index fc88317..b626bdb 100644 --- a/t/lib/TestApp/Controller/Root.pm +++ b/t/lib/TestApp/Controller/Root.pm @@ -1,6 +1,8 @@ package TestApp::Controller::Root; - +use strict; +use warnings; use base 'Catalyst::Controller'; +use utf8; __PACKAGE__->config->{namespace} = ''; @@ -13,4 +15,99 @@ sub zero : Path('0') { $c->forward('TestApp::View::Dump::Request'); } +sub zerobody : Local { + my ($self, $c) = @_; + $c->res->body('0'); +} + +sub emptybody : Local { + my ($self, $c) = @_; + $c->res->body(''); +} + +sub index : Private { + my ( $self, $c ) = @_; + $c->res->body('root index'); +} + +sub global_action : Private { + my ( $self, $c ) = @_; + $c->forward('TestApp::View::Dump::Request'); +} + +sub class_forward_test_method :Private { + my ( $self, $c ) = @_; + $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 ); +} + +sub loop_test : Local { + my ( $self, $c ) = @_; + + for( 1..1001 ) { + $c->forward( 'class_forward_test_method' ); + } +} + +sub recursion_test : Local { + my ( $self, $c ) = @_; + no warnings 'recursion'; + $c->forward( 'recursion_test' ); +} + +sub base_href_test : Local { + my ( $self, $c ) = @_; + + my $body = <<"EndOfBody"; + +
+