From bb06c5407f1854ce35f7d1a461ff3b3befb90f3b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 2 Sep 2025 12:43:53 +0200 Subject: [PATCH] Bug 40680: Fix t tests --- t/db_dependent/Biblio.t | 2 +- t/db_dependent/Biblio/Isbd.t | 2 +- t/db_dependent/Breeding.t | 2 +- t/db_dependent/Circulation/dateexpiry.t | 2 +- t/db_dependent/Koha/Z3950Responder/GenericSession.t | 2 +- t/db_dependent/Koha/Z3950Responder/ZebraSession.t | 2 +- t/db_dependent/Linker_Default.t | 4 ++-- t/db_dependent/Linker_FirstMatch.t | 4 ++-- t/db_dependent/Log.t | 2 +- t/db_dependent/UsageStats.t | 2 +- t/db_dependent/rollingloans.t | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t index e34c00e6da3..dfa0158cf2d 100755 --- a/t/db_dependent/Biblio.t +++ b/t/db_dependent/Biblio.t @@ -24,7 +24,7 @@ use Test::Warn; use List::MoreUtils qw( uniq ); use MARC::Record; -use t::lib::Mocks qw( mock_preference ); +use t::lib::Mocks; use t::lib::TestBuilder; use Koha::ActionLogs; diff --git a/t/db_dependent/Biblio/Isbd.t b/t/db_dependent/Biblio/Isbd.t index 051ae798f1c..68478b0f334 100755 --- a/t/db_dependent/Biblio/Isbd.t +++ b/t/db_dependent/Biblio/Isbd.t @@ -21,7 +21,7 @@ use Test::NoWarnings; use Test::More tests => 4; use Test::MockModule; use MARC::Record; -use t::lib::Mocks qw( mock_preference ); +use t::lib::Mocks; use Koha::Database; diff --git a/t/db_dependent/Breeding.t b/t/db_dependent/Breeding.t index 8993dab8957..c3effc06d82 100755 --- a/t/db_dependent/Breeding.t +++ b/t/db_dependent/Breeding.t @@ -28,7 +28,7 @@ use Test::NoWarnings; use Test::More tests => 6; use Test::Warn; -use t::lib::Mocks qw( mock_preference ); +use t::lib::Mocks; use t::lib::TestBuilder; use C4::Context; diff --git a/t/db_dependent/Circulation/dateexpiry.t b/t/db_dependent/Circulation/dateexpiry.t index 8eb52d443dc..277c027fb8a 100755 --- a/t/db_dependent/Circulation/dateexpiry.t +++ b/t/db_dependent/Circulation/dateexpiry.t @@ -26,7 +26,7 @@ use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Database; use t::lib::TestBuilder; -use t::lib::Mocks qw( mock_preference ); +use t::lib::Mocks; my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; diff --git a/t/db_dependent/Koha/Z3950Responder/GenericSession.t b/t/db_dependent/Koha/Z3950Responder/GenericSession.t index b8e0fba962d..049715ea265 100755 --- a/t/db_dependent/Koha/Z3950Responder/GenericSession.t +++ b/t/db_dependent/Koha/Z3950Responder/GenericSession.t @@ -6,7 +6,7 @@ use utf8; use Test::NoWarnings; use Test::More tests => 4; use Test::WWW::Mechanize; -use t::lib::Mocks qw(mock_preference); +use t::lib::Mocks; use File::Basename; use File::Copy; diff --git a/t/db_dependent/Koha/Z3950Responder/ZebraSession.t b/t/db_dependent/Koha/Z3950Responder/ZebraSession.t index dc1951378c0..154a69bb5a1 100755 --- a/t/db_dependent/Koha/Z3950Responder/ZebraSession.t +++ b/t/db_dependent/Koha/Z3950Responder/ZebraSession.t @@ -5,7 +5,7 @@ use Modern::Perl; use Test::NoWarnings; use Test::More tests => 4; use Test::MockObject; -use t::lib::Mocks qw(mock_preference); +use t::lib::Mocks; use ZOOM; diff --git a/t/db_dependent/Linker_Default.t b/t/db_dependent/Linker_Default.t index 38a917ddf0d..d21b51d843f 100755 --- a/t/db_dependent/Linker_Default.t +++ b/t/db_dependent/Linker_Default.t @@ -22,10 +22,10 @@ use Test::More tests => 3; use MARC::Record; use MARC::Field; use MARC::File::XML; -use C4::Heading qw( authorities field new_from_field auth_type search_form ); +use C4::Heading; use C4::Linker::Default; use Test::MockModule; -use t::lib::Mocks qw( mock_preference ); +use t::lib::Mocks; use t::lib::TestBuilder; BEGIN { diff --git a/t/db_dependent/Linker_FirstMatch.t b/t/db_dependent/Linker_FirstMatch.t index 1b6cce305ab..812b01059f9 100755 --- a/t/db_dependent/Linker_FirstMatch.t +++ b/t/db_dependent/Linker_FirstMatch.t @@ -25,10 +25,10 @@ use Test::More tests => 4; use MARC::Record; use MARC::Field; use MARC::File::XML; -use C4::Heading qw( authorities field new_from_field ); +use C4::Heading; use C4::Linker::FirstMatch; use Test::MockModule; -use t::lib::Mocks qw( mock_preference ); +use t::lib::Mocks; use t::lib::TestBuilder; BEGIN { diff --git a/t/db_dependent/Log.t b/t/db_dependent/Log.t index 90bb355be79..13560a2e06f 100755 --- a/t/db_dependent/Log.t +++ b/t/db_dependent/Log.t @@ -25,7 +25,7 @@ use C4::Auth qw( checkpw ); use Koha::Database; use Koha::ActionLogs; -use t::lib::Mocks qw/mock_preference/; # to mock CronjobLog +use t::lib::Mocks; use t::lib::TestBuilder; use JSON qw( decode_json ); diff --git a/t/db_dependent/UsageStats.t b/t/db_dependent/UsageStats.t index c0d5d1b9050..5f3642dddc4 100755 --- a/t/db_dependent/UsageStats.t +++ b/t/db_dependent/UsageStats.t @@ -19,7 +19,7 @@ use Modern::Perl; use Test::NoWarnings; use Test::More tests => 4; -use t::lib::Mocks qw(mock_preference); +use t::lib::Mocks; use t::lib::TestBuilder; use POSIX qw(strftime); diff --git a/t/db_dependent/rollingloans.t b/t/db_dependent/rollingloans.t index cf198018aac..02e9718b34d 100755 --- a/t/db_dependent/rollingloans.t +++ b/t/db_dependent/rollingloans.t @@ -9,7 +9,7 @@ use Koha::DateUtils qw( dt_from_string ); use Koha::Libraries; use Koha::Patrons; use t::lib::TestBuilder; -use t::lib::Mocks qw(mock_preference); +use t::lib::Mocks; use Test::NoWarnings; use Test::More tests => 9; -- 2.34.1