From 36233164575aff17c9b1d0865dd9e62e9952186f 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 fb2c54a83f..bca89014a2 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 d452654452..142b55e414 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 d2042a1c6e..aeda5cd091 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 505d949170..0ab6669b65 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 b8e0fba962..049715ea26 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 dc1951378c..154a69bb5a 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 bd9cb4269f..c0b270ba89 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 406b8bbf69..167a750ab9 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 21ba67b1b1..2f38cbbe53 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 d5b347ef1f..94cff89658 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 cf198018aa..02e9718b34 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.51.0