Bug 929 : Follow up to allow tests to check plugins too

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
perl xt/author/valid-templates.t runs without errors now.
This commit is contained in:
Chris Cormack 2012-01-14 07:28:11 +13:00 committed by Paul Poulain
parent 5dcc27d14c
commit 2cfb891c83
1 changed files with 12 additions and 7 deletions

View File

@ -50,13 +50,18 @@ done_testing();
sub create_template_test {
my $includes = shift;
return sub {
my $tt = Template->new({ABSOLUTE => 1,
INCLUDE_PATH => $includes });
my $vars;
my $output;
if ( ! ok($tt->process($_,$vars,\$output), $_) ){
diag($tt->error);
}
my $tt = Template->new(
{
ABSOLUTE => 1,
INCLUDE_PATH => $includes,
PLUGIN_BASE => 'Koha::Template::Plugin',
}
);
my $vars;
my $output;
if ( !ok( $tt->process( $_, $vars, \$output ), $_ ) ) {
diag( $tt->error );
}
}
}