Moved end() from Catalyst::Plugin::Test::Plugin to TestApp::Controller::Root. Fixed...
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Root.pm
CommitLineData
32d5a0c5 1package TestApp::Controller::Root;
2
3use base 'Catalyst::Controller';
4
5__PACKAGE__->config->{namespace} = '';
6
81e75875 7sub chain_root_index : Chained('/') PathPart('') Args(0) { }
8
53119b78 9sub zero : Path('0') {
10 my ( $self, $c ) = @_;
11 $c->res->header( 'X-Test-Class' => ref($self) );
12 $c->response->content_type('text/plain; charset=utf-8');
13 $c->forward('TestApp::View::Dump::Request');
14}
15
19c01ee1 16sub localregex : LocalRegex('^localregex$') {
17 my ( $self, $c ) = @_;
18 $c->res->header( 'X-Test-Class' => ref($self) );
19 $c->response->content_type('text/plain; charset=utf-8');
20 $c->forward('TestApp::View::Dump::Request');
21}
22
a202886b 23sub index : Private {
24 my ( $self, $c ) = @_;
25 $c->res->body('root index');
26}
27
28sub global_action : Private {
29 my ( $self, $c ) = @_;
30 $c->forward('TestApp::View::Dump::Request');
31}
32
33sub class_forward_test_method :Private {
34 my ( $self, $c ) = @_;
35 $c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 );
36}
37
38sub loop_test : Local {
39 my ( $self, $c ) = @_;
40
41 for( 1..1001 ) {
42 $c->forward( 'class_forward_test_method' );
43 }
44}
45
46sub recursion_test : Local {
47 my ( $self, $c ) = @_;
48 $c->forward( 'recursion_test' );
49}
50
a0a66cb8 51sub end : Private {
52 my ($self,$c) = @_;
53}
54
32d5a0c5 551;