5 use HTTP::Request::Common;
6 use HTTP::Message::PSGI ();
7 use Encode 2.21 'decode_utf8', 'encode_utf8', 'encode';
10 package MyApp::Controller::Root;
11 $INC{'MyApp/Controller/Root.pm'} = __FILE__;
13 use base 'Catalyst::Controller';
15 sub heart :Local Args(1) {
16 my ($self, $c, $arg) = @_;
18 Test::More::is $c->req->query_parameters->{a}, 111;
19 Test::More::is $c->req->query_parameters->{b}, 222;
20 Test::More::is $arg, 1;
22 $c->response->content_type('text/html');
23 $c->response->body("<p>This is path local</p>");
29 MyApp->config(encoding => undef);
31 Test::More::ok(MyApp->setup, 'setup app');
34 use Catalyst::Test 'MyApp';
37 my $res = request "/root/heart/1?a=111&b=222";
38 is $res->code, 200, 'OK';
39 is $res->content, '<p>This is path local</p>';