Lines 2-8
Link Here
|
2 |
|
2 |
|
3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
4 |
|
4 |
|
5 |
use Test::More tests => 8; |
5 |
use Test::More tests => 10; |
6 |
use CGI; |
6 |
use CGI; |
7 |
use File::Basename; |
7 |
use File::Basename; |
8 |
use File::Spec; |
8 |
use File::Spec; |
Lines 36-41
use_ok( 'Koha::Template::Plugin::KohaPlugins', 'Can use Koha::Template::Plugin::
Link Here
|
36 |
|
36 |
|
37 |
ok( my $plugin = Koha::Template::Plugin::KohaPlugins->new(), 'Able to instantiate template plugin' ); |
37 |
ok( my $plugin = Koha::Template::Plugin::KohaPlugins->new(), 'Able to instantiate template plugin' ); |
38 |
|
38 |
|
|
|
39 |
t::lib::Mocks::mock_preference('UseKohaPlugins',1); |
40 |
t::lib::Mocks::mock_config('enable_plugins',1); |
39 |
ok( index( $plugin->get_plugins_opac_js, 'Koha::Plugin::Test::opac_js' ) != -1, 'Test plugin opac_js return value is part of code returned by get_plugins_opac_js' ); |
41 |
ok( index( $plugin->get_plugins_opac_js, 'Koha::Plugin::Test::opac_js' ) != -1, 'Test plugin opac_js return value is part of code returned by get_plugins_opac_js' ); |
40 |
|
|
|
41 |
ok( index( $plugin->get_plugins_opac_head, 'Koha::Plugin::Test::opac_head' ) != -1, 'Test plugin opac_head return value is part of code returned by get_plugins_opac_head' ); |
42 |
ok( index( $plugin->get_plugins_opac_head, 'Koha::Plugin::Test::opac_head' ) != -1, 'Test plugin opac_head return value is part of code returned by get_plugins_opac_head' ); |
42 |
- |
43 |
|
|
|
44 |
t::lib::Mocks::mock_preference('UseKohaPlugins',0); |
45 |
t::lib::Mocks::mock_config('enable_plugins',0); |
46 |
is( $plugin->get_plugins_opac_js, q{}, 'Test plugin opac_js return value is empty' ); |
47 |
is( $plugin->get_plugins_opac_head, q{}, 'Test plugin opac_head return value is empty' ); |