183
|
1 package Test::Web::View;
|
|
2 use strict;
|
|
3 use warnings;
|
|
4
|
|
5 use parent qw(IMPL::Test::Unit);
|
|
6 __PACKAGE__->PassThroughArgs;
|
|
7
|
|
8 use IMPL::Test qw(assert test);
|
|
9 use IMPL::Web::View::TTLoader();
|
|
10
|
|
11 use constant {
|
|
12 TTLoader => typeof IMPL::Web::View::TTLoader
|
|
13 };
|
|
14
|
|
15 test TemplateLoaderTests => sub {
|
|
16 my ($this) = @_;
|
|
17
|
|
18 my $loader = TTLoader->new(
|
|
19 {
|
|
20 INCLUDE_PATH => [
|
|
21 $this->GetResourceDir('Resources')
|
|
22 ]
|
|
23 },
|
|
24 ext => '.tt'
|
|
25 );
|
|
26
|
|
27 assert( defined(my $tt = $loader->template('simple') ) );
|
|
28
|
|
29 $tt;
|
|
30 };
|
|
31
|
|
32 1; |