removed old PSGI Engine backcompat
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Dump.pm
CommitLineData
dd4e6fd2 1package TestApp::Controller::Dump;
2
3use strict;
c057ae86 4use base 'Catalyst::Controller';
dd4e6fd2 5
81e2964a 6sub default : Action {
dd4e6fd2 7 my ( $self, $c ) = @_;
8 $c->forward('TestApp::View::Dump');
9}
10
316bf0f0 11sub env : Action Relative {
12 my ( $self, $c ) = @_;
faa02805 13 $c->stash(env => $c->req->env);
14 $c->forward('TestApp::View::Dump::Env');
15}
16
17sub env_on_engine : Action Relative {
18 my ( $self, $c ) = @_;
1ef7eebf 19 # JNAP - I changed this to req since the engine no longer
20 # has the env but the tests here are useful.
21 $c->stash(env => $c->req->env);
e74b3d5c 22 $c->forward('TestApp::View::Dump::Env');
316bf0f0 23}
24
dd4e6fd2 25sub request : Action Relative {
26 my ( $self, $c ) = @_;
d157ca3d 27 $c->req->params(undef); # Should be a no-op, and be ignored.
28 # Back compat test for 5.7
dd4e6fd2 29 $c->forward('TestApp::View::Dump::Request');
30}
31
11e7af55 32sub prepare_parameters : Action Relative {
33 my ( $self, $c ) = @_;
34
35 die 'Must pass in parameters' unless keys %{$c->req->parameters};
36
37 $c->req->parameters( {} );
38 die 'parameters are not empty' if keys %{$c->req->parameters};
39
40 # Now reset and reload
41 $c->prepare_parameters;
42 die 'Parameters were not reset' unless keys %{$c->req->parameters};
43
44 $c->forward('TestApp::View::Dump::Request');
45}
dd4e6fd2 46sub response : Action Relative {
47 my ( $self, $c ) = @_;
48 $c->forward('TestApp::View::Dump::Response');
49}
50
c4b09639 51sub body : Action Relative {
52 my ( $self, $c ) = @_;
53 $c->forward('TestApp::View::Dump::Body');
54}
55
dd4e6fd2 561;