Typo fix
[catagits/Catalyst-Runtime.git] / t / lib / TestAppEncoding / Controller / Root.pm
CommitLineData
5ab21903 1package TestAppEncoding::Controller::Root;
2use strict;
3use warnings;
4use base 'Catalyst::Controller';
5use Test::More;
6
7__PACKAGE__->config->{namespace} = '';
8
9sub binary : Local {
10 my ($self, $c) = @_;
b42b9094 11 $c->res->body(do { open(my $fh, '<', $c->path_to('..', '..', 'catalyst_130pix.gif')) or die $!; binmode($fh); local $/ = undef; <$fh>; });
5ab21903 12}
13
14sub binary_utf8 : Local {
15 my ($self, $c) = @_;
16 $c->forward('binary');
17 my $str = $c->res->body;
18 utf8::upgrade($str);
19 ok utf8::is_utf8($str), 'Body is variable width encoded string';
20 $c->res->body($str);
21}
22
23sub end : Private {
24 my ($self,$c) = @_;
25}
26
271;