Lines 16-22
Link Here
|
16 |
|
16 |
|
17 |
use Modern::Perl; |
17 |
use Modern::Perl; |
18 |
|
18 |
|
19 |
use Test::More tests => 4; |
19 |
use Test::More tests => 5; |
20 |
use Test::MockModule; |
20 |
use Test::MockModule; |
21 |
use Test::Warn; |
21 |
use Test::Warn; |
22 |
|
22 |
|
Lines 51-57
subtest 'template_include_paths' => sub {
Link Here
|
51 |
$template->process( \"[% INCLUDE test.inc %]", {}, \$output ) || die $template->error(); |
51 |
$template->process( \"[% INCLUDE test.inc %]", {}, \$output ) || die $template->error(); |
52 |
is( $output, 'included content' ); |
52 |
is( $output, 'included content' ); |
53 |
|
53 |
|
54 |
$schema->storage->txn_commit; |
54 |
$schema->storage->txn_rollback; |
|
|
55 |
}; |
56 |
|
57 |
subtest 'cannot override core templates' => sub { |
58 |
plan tests => 1; |
59 |
|
60 |
$schema->storage->txn_begin; |
61 |
|
62 |
Koha::Plugins->new->InstallPlugins(); |
63 |
Koha::Plugin::Test->new->enable; |
64 |
|
65 |
require C4::Templates; |
66 |
my $c4_template = C4::Templates::gettemplate( 'intranet-main.tt', 'intranet' ); |
67 |
my $template = $c4_template->{TEMPLATE}; |
68 |
my $output = ''; |
69 |
$template->process( \"[% INCLUDE 'csrf-token.inc' %]", {}, \$output ) || die $template->error(); |
70 |
unlike( $output, qr/OVERRIDE/ ); |
55 |
|
71 |
|
56 |
#Koha::Plugins::Methods->delete; |
72 |
$schema->storage->txn_rollback; |
57 |
}; |
73 |
}; |