diff --git a/t/db_dependent/ImportBatch.t b/t/db_dependent/ImportBatch.t index 788be3fc6d..f42e0d8822 100644 --- a/t/db_dependent/ImportBatch.t +++ b/t/db_dependent/ImportBatch.t @@ -2,7 +2,7 @@ use Modern::Perl; use Test::More tests => 14; -use Cwd qw(abs_path); +use File::Basename; use File::Temp qw/tempfile/; use t::lib::Mocks; @@ -13,8 +13,7 @@ use Koha::Plugins; BEGIN { # Mock pluginsdir before loading Plugins module - my $path = abs_path(__FILE__); - $path =~ s/(\/[^\/]+){2}$//; # remove db_dependent and filename + my $path = dirname(__FILE__) . '/../lib'; t::lib::Mocks::mock_config( 'pluginsdir', $path ); use_ok('C4::ImportBatch'); } diff --git a/t/db_dependent/Koha_Template_Plugin_KohaPlugins.t b/t/db_dependent/Koha_Template_Plugin_KohaPlugins.t index 723f07c4ad..8f90125cc9 100755 --- a/t/db_dependent/Koha_Template_Plugin_KohaPlugins.t +++ b/t/db_dependent/Koha_Template_Plugin_KohaPlugins.t @@ -16,7 +16,7 @@ use C4::Context; use t::lib::Mocks; BEGIN { - push( @INC, dirname(__FILE__) ); + push( @INC, dirname(__FILE__) . '/../lib' ); use_ok('Koha::Plugins'); use_ok('Koha::Plugins::Handler'); diff --git a/t/Koha/Plugin/MarcFieldValues.pm b/t/lib/Koha/Plugin/MarcFieldValues.pm similarity index 100% rename from t/Koha/Plugin/MarcFieldValues.pm rename to t/lib/Koha/Plugin/MarcFieldValues.pm diff --git a/t/Koha/Plugin/Test.pm b/t/lib/Koha/Plugin/Test.pm similarity index 100% rename from t/Koha/Plugin/Test.pm rename to t/lib/Koha/Plugin/Test.pm