From a743d4713ca65e97e1891a272b7402369809662a Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Sat, 14 Jan 2012 07:28:11 +1300 Subject: [PATCH] [SIGNED-OFF] Bug 929 : Follow up to allow tests to check plugins too Signed-off-by: Katrin Fischer perl xt/author/valid-templates.t runs without errors now. --- xt/author/valid-templates.t | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/xt/author/valid-templates.t b/xt/author/valid-templates.t index a4fa71e..202ef57 100644 --- a/xt/author/valid-templates.t +++ b/xt/author/valid-templates.t @@ -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 ); + } } } -- 1.7.5.4