Bug 929 : Follow up to allow tests to check plugins too
authorChris Cormack <chrisc@catalyst.net.nz>
Fri, 13 Jan 2012 18:28:11 +0000 (07:28 +1300)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 16 Jan 2012 17:18:11 +0000 (18:18 +0100)
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
perl xt/author/valid-templates.t runs without errors now.

xt/author/valid-templates.t

index a4fa71e..202ef57 100644 (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 );
+        }
     }
 }