5 use Encode 2.21 'decode_utf8', 'encode_utf8';
9 package MyApp::Controller::Root;
10 $INC{'MyApp/Controller/Root.pm'} = __FILE__;
12 use base 'Catalyst::Controller';
14 sub heart :Path('♥') {
16 $c->response->content_type('text/html');
17 $c->response->body("<p>This is path-heart action ♥</p>");
26 use Test::WWW::Mechanize::Catalyst 'MyApp';
28 my $root = "http://localhost";
29 my $m = Test::WWW::Mechanize::Catalyst->new( autocheck => 0 );
31 if(MyApp->can('encoding') and MyApp->can('clear_encoding') and MyApp->encoding eq 'UTF-8') {
32 $m->get_ok("$root/root/♥", 'got page');
33 is( $m->ct, "text/html" );
34 $m->content_contains("This is path-heart action ♥", 'matched expected content');
36 ok 1, 'Skipping the UTF8 Tests for older installed catalyst';