|
Lines 12-18
use Module::Load::Conditional qw(can_load);
Link Here
|
| 12 |
use Test::MockModule; |
12 |
use Test::MockModule; |
| 13 |
|
13 |
|
| 14 |
use C4::Context; |
14 |
use C4::Context; |
| 15 |
use Koha::UploadedFile; |
|
|
| 16 |
|
15 |
|
| 17 |
use t::lib::Mocks; |
16 |
use t::lib::Mocks; |
| 18 |
|
17 |
|
|
Lines 63-70
is( $plugin->get_plugin_http_path(), '/plugin/Koha/Plugin/Test', 'Test $plugin->
Link Here
|
| 63 |
# test absolute path change in get_template with Koha::Plugin::Test |
62 |
# test absolute path change in get_template with Koha::Plugin::Test |
| 64 |
# using the mock set before |
63 |
# using the mock set before |
| 65 |
# we also add tmpdir as an approved template dir |
64 |
# we also add tmpdir as an approved template dir |
| 66 |
t::lib::Mocks::mock_config( 'pluginsdir', [ C4::Context::temporary_directory ] ); |
65 |
t::lib::Mocks::mock_config( 'pluginsdir', [ C4::Context->temporary_directory ] ); |
| 67 |
my ( $fh, $fn ) = tempfile( SUFFIX => '.tt', UNLINK => 1 ); |
66 |
my ( $fh, $fn ) = tempfile( SUFFIX => '.tt', UNLINK => 1, DIR => C4::Context->temporary_directory ); |
| 68 |
print $fh 'I am [% filename %]'; |
67 |
print $fh 'I am [% filename %]'; |
| 69 |
close $fh; |
68 |
close $fh; |
| 70 |
my $classname = ref($plugin); |
69 |
my $classname = ref($plugin); |