From e11de855aacc4ac8e507c57f0f6f1775744b473d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 3 Oct 2025 15:26:08 +0200 Subject: [PATCH] Bug 40680: Fix t tests --- t/AuthoritiesMarc_MARC21.t | 2 +- t/AuthoritiesMarc_UNIMARC.t | 2 +- t/ClassSortRoutine_Dewey.t | 2 +- t/ClassSortRoutine_Generic.t | 2 +- t/ClassSortRoutine_LCC.t | 2 +- t/Creators.t | 2 +- t/Labels.t | 2 +- t/Labels_split_Regex.t | 2 +- t/Labels_split_ddcn.t | 2 +- t/SMS.t | 2 +- t/Search/History.t | 4 ++-- t/db_dependent/Barcodes.t | 2 +- t/db_dependent/Barcodes_ValueBuilder.t | 7 ++----- 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/Heading.t | 2 +- t/db_dependent/Heading_MARC21.t | 2 +- t/db_dependent/Holds.t | 3 +-- t/db_dependent/Holidays.t | 5 +---- t/db_dependent/ILSDI_Services.t | 5 +---- t/db_dependent/Koha/Plugins/Account_hooks.t | 2 +- t/db_dependent/Koha/Template/Plugin/JSConsents.t | 2 +- t/db_dependent/Koha/Template/Plugin/KohaPlugins.t | 2 +- t/db_dependent/Koha/Template/Plugin/TablesSettings.t | 5 ++++- t/db_dependent/Koha/Z3950Responder/GenericSession.t | 2 +- t/db_dependent/Koha/Z3950Responder/ZebraSession.t | 2 +- t/db_dependent/Labels/t_Batch.t | 7 ++----- t/db_dependent/Linker_Default.t | 4 ++-- t/db_dependent/Linker_FirstMatch.t | 4 ++-- t/db_dependent/Log.t | 2 +- t/db_dependent/Matcher.t | 2 +- t/db_dependent/SIP/SIPServer.t | 2 +- t/db_dependent/Search/History.t | 3 ++- t/db_dependent/SocialData.t | 5 +++-- t/db_dependent/UsageStats.t | 4 ++-- t/db_dependent/rollingloans.t | 2 +- 38 files changed, 50 insertions(+), 58 deletions(-) diff --git a/t/AuthoritiesMarc_MARC21.t b/t/AuthoritiesMarc_MARC21.t index 679d68ecab7..1babb42cd4e 100755 --- a/t/AuthoritiesMarc_MARC21.t +++ b/t/AuthoritiesMarc_MARC21.t @@ -16,7 +16,7 @@ use MARC::Record; use C4::AuthoritiesMarc qw( FindDuplicateAuthority ); BEGIN { - use_ok( 'C4::AuthoritiesMarc::MARC21', qw( default_auth_type_location fix_marc21_auth_type_location ) ); + use_ok('C4::AuthoritiesMarc::MARC21'); } my @result = C4::AuthoritiesMarc::MARC21::default_auth_type_location(); diff --git a/t/AuthoritiesMarc_UNIMARC.t b/t/AuthoritiesMarc_UNIMARC.t index 4ac3e74a3c8..7c38be62611 100755 --- a/t/AuthoritiesMarc_UNIMARC.t +++ b/t/AuthoritiesMarc_UNIMARC.t @@ -10,7 +10,7 @@ use Test::NoWarnings; use Test::More tests => 3; BEGIN { - use_ok( 'C4::AuthoritiesMarc::UNIMARC', qw( default_auth_type_location ) ); + use_ok('C4::AuthoritiesMarc::UNIMARC'); } my @test = C4::AuthoritiesMarc::UNIMARC::default_auth_type_location(); diff --git a/t/ClassSortRoutine_Dewey.t b/t/ClassSortRoutine_Dewey.t index c05f6973ef2..95208baf1b8 100755 --- a/t/ClassSortRoutine_Dewey.t +++ b/t/ClassSortRoutine_Dewey.t @@ -10,7 +10,7 @@ use Test::NoWarnings; use Test::More tests => 11; BEGIN { - use_ok( 'C4::ClassSortRoutine::Dewey', qw( get_class_sort_key ) ); + use_ok('C4::ClassSortRoutine::Dewey'); } my $cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key( undef, undef ); diff --git a/t/ClassSortRoutine_Generic.t b/t/ClassSortRoutine_Generic.t index 843f56541f4..7f973402bc7 100755 --- a/t/ClassSortRoutine_Generic.t +++ b/t/ClassSortRoutine_Generic.t @@ -10,7 +10,7 @@ use Test::NoWarnings; use Test::More tests => 4; BEGIN { - use_ok( 'C4::ClassSortRoutine::Generic', qw( get_class_sort_key ) ); + use_ok('C4::ClassSortRoutine::Generic'); } my $cn_class = "My class "; diff --git a/t/ClassSortRoutine_LCC.t b/t/ClassSortRoutine_LCC.t index b98a6e2136b..e429b10553a 100755 --- a/t/ClassSortRoutine_LCC.t +++ b/t/ClassSortRoutine_LCC.t @@ -10,7 +10,7 @@ use Test::NoWarnings; use Test::More tests => 11; BEGIN { - use_ok( 'C4::ClassSortRoutine::LCC', qw( get_class_sort_key ) ); + use_ok('C4::ClassSortRoutine::LCC'); } #Obvious cases diff --git a/t/Creators.t b/t/Creators.t index 683627f908c..8c7eb959e41 100755 --- a/t/Creators.t +++ b/t/Creators.t @@ -19,7 +19,7 @@ use Test::More tests => 42; BEGIN { use_ok('C4::Creators'); - use_ok( 'C4::Creators::PDF', qw( Init Add Bookmark Compress Font FontSize Page StrWidth Text End ) ); + use_ok('C4::Creators::PDF'); } my $pdf_creator = C4::Creators::PDF->new( InitVars => 0 ); diff --git a/t/Labels.t b/t/Labels.t index e7335cce921..ee87ac7a428 100755 --- a/t/Labels.t +++ b/t/Labels.t @@ -24,7 +24,7 @@ use Test::More tests => 12; use Test::NoWarnings; BEGIN { - use_ok( 'C4::Labels::Label', qw( _get_text_fields _check_params _guide_box ) ); + use_ok('C4::Labels::Label'); } my $format_string = "title, callnumber"; diff --git a/t/Labels_split_Regex.t b/t/Labels_split_Regex.t index abfe31e3113..c4d1f2d8d6c 100755 --- a/t/Labels_split_Regex.t +++ b/t/Labels_split_Regex.t @@ -19,7 +19,7 @@ use Modern::Perl; use Test::NoWarnings; use Test::More tests => 6; -use C4::ClassSplitRoutine::RegEx qw( split_callnumber ); +use C4::ClassSplitRoutine::RegEx; my $callnumbers = { '830 Han' => [qw{830 Han}], diff --git a/t/Labels_split_ddcn.t b/t/Labels_split_ddcn.t index fc2cb6431f4..3230b9f7ccc 100755 --- a/t/Labels_split_ddcn.t +++ b/t/Labels_split_ddcn.t @@ -41,7 +41,7 @@ BEGIN { $test_num += 4; } plan tests => $test_num + 1; - use_ok( 'C4::ClassSplitRoutine::Dewey', qw( split_callnumber ) ); + use_ok('C4::ClassSplitRoutine::Dewey'); use vars qw($ddcns); } diff --git a/t/SMS.t b/t/SMS.t index 95f127fc45f..0498563b403 100755 --- a/t/SMS.t +++ b/t/SMS.t @@ -23,7 +23,7 @@ use Test::NoWarnings; use Test::More tests => 9; BEGIN { - use_ok( 'C4::SMS', qw( driver send_sms ) ); + use_ok('C4::SMS'); } my $driver = 'my mock driver'; diff --git a/t/Search/History.t b/t/Search/History.t index 32efb2471b1..895d29d6a39 100755 --- a/t/Search/History.t +++ b/t/Search/History.t @@ -8,8 +8,8 @@ use URI::Escape; use JSON qw( decode_json ); use_ok('Koha::DateUtils'); -use_ok( 'C4::Search::History', qw( get get_from_session set_to_session delete ) ); -use_ok( 'C4::Auth', qw/get_session/ ); +use_ok('C4::Search::History'); +use_ok( 'C4::Auth', qw/get_session/ ); # Test session my $expected_recent_searches = [ diff --git a/t/db_dependent/Barcodes.t b/t/db_dependent/Barcodes.t index de0a62b7b0c..802bbc754c0 100755 --- a/t/db_dependent/Barcodes.t +++ b/t/db_dependent/Barcodes.t @@ -30,7 +30,7 @@ $| = 1; BEGIN { use FindBin; use lib $FindBin::Bin; - use_ok( 'C4::Barcodes', qw( value initial max db_max next_value next previous serial autoBarcode is_max ) ); + use_ok('C4::Barcodes'); } my $builder = t::lib::TestBuilder->new; diff --git a/t/db_dependent/Barcodes_ValueBuilder.t b/t/db_dependent/Barcodes_ValueBuilder.t index 15328e85728..83f4c3f33ae 100755 --- a/t/db_dependent/Barcodes_ValueBuilder.t +++ b/t/db_dependent/Barcodes_ValueBuilder.t @@ -17,15 +17,12 @@ use Modern::Perl; use Test::NoWarnings; -use Test::More tests => 10; +use Test::More tests => 9; use Test::MockModule; use t::lib::TestBuilder; use Koha::Database; - -BEGIN { - use_ok( 'C4::Barcodes::ValueBuilder', qw( get_barcode ) ); -} +use C4::Barcodes::ValueBuilder; my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t index fb2c54a83fa..bca89014a23 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 d4526544522..142b55e4144 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 d2042a1c6e0..aeda5cd0911 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 505d9491709..0ab6669b656 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/Heading.t b/t/db_dependent/Heading.t index 6a7698aa4b0..cd59b159332 100755 --- a/t/db_dependent/Heading.t +++ b/t/db_dependent/Heading.t @@ -32,7 +32,7 @@ use utf8; use C4::AuthoritiesMarc qw/ AddAuthority /; BEGIN { - use_ok( 'C4::Heading', qw( field valid_heading_subfield ) ); + use_ok('C4::Heading'); } subtest "MARC21 tests" => sub { diff --git a/t/db_dependent/Heading_MARC21.t b/t/db_dependent/Heading_MARC21.t index efdd7da4acf..cc3da31eb9e 100755 --- a/t/db_dependent/Heading_MARC21.t +++ b/t/db_dependent/Heading_MARC21.t @@ -11,7 +11,7 @@ use Test::More tests => 11; use C4::Context; BEGIN { - use_ok( 'C4::Heading', qw( field new_from_field display_form search_form ) ); + use_ok( 'C4::Heading', qw( new_from_field ) ); } SKIP: { diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t index 52a5158d2e1..10e2597d8fc 100755 --- a/t/db_dependent/Holds.t +++ b/t/db_dependent/Holds.t @@ -24,14 +24,13 @@ use Koha::Biblios; use Koha::CirculationRules; use Koha::Database; use Koha::DateUtils qw( dt_from_string output_pref ); -use Koha::Holds qw( search ); +use Koha::Holds; use Koha::Checkout; use Koha::Item::Transfer::Limits; use Koha::Items; use Koha::Libraries; use Koha::Library::Groups; use Koha::Patrons; -use Koha::Hold qw( get_items_that_can_fill ); use Koha::Item::Transfers; BEGIN { diff --git a/t/db_dependent/Holidays.t b/t/db_dependent/Holidays.t index a1508875b25..46feb3693b7 100755 --- a/t/db_dependent/Holidays.t +++ b/t/db_dependent/Holidays.t @@ -31,10 +31,7 @@ use Koha::DateUtils qw( dt_from_string ); BEGIN { use_ok('Koha::Calendar'); - use_ok( - 'C4::Calendar', - qw( insert_exception_holiday insert_week_day_holiday insert_day_month_holiday insert_single_holiday copy_to_branch get_exception_holidays isHoliday ) - ); + use_ok('C4::Calendar'); } my $schema = Koha::Database->new->schema; diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t index d023f8ad3d7..d82c1a10f5c 100755 --- a/t/db_dependent/ILSDI_Services.t +++ b/t/db_dependent/ILSDI_Services.t @@ -37,10 +37,7 @@ use Koha::DateUtils qw( dt_from_string ); use Koha::MarcSubfieldStructures; BEGIN { - use_ok( - 'C4::ILSDI::Services', - qw( AuthenticatePatron GetPatronInfo LookupPatron HoldTitle HoldItem GetRecords RenewLoan GetAvailability ) - ); + use_ok('C4::ILSDI::Services'); } my $schema = Koha::Database->schema; diff --git a/t/db_dependent/Koha/Plugins/Account_hooks.t b/t/db_dependent/Koha/Plugins/Account_hooks.t index b20a7120c3a..f223f0dd360 100755 --- a/t/db_dependent/Koha/Plugins/Account_hooks.t +++ b/t/db_dependent/Koha/Plugins/Account_hooks.t @@ -23,7 +23,7 @@ use Test::Warn; use File::Basename; -use Koha::Account qw( add_credit ); +use Koha::Account; use t::lib::Mocks; use t::lib::TestBuilder; diff --git a/t/db_dependent/Koha/Template/Plugin/JSConsents.t b/t/db_dependent/Koha/Template/Plugin/JSConsents.t index bde7ef94192..1e7393fb1d5 100755 --- a/t/db_dependent/Koha/Template/Plugin/JSConsents.t +++ b/t/db_dependent/Koha/Template/Plugin/JSConsents.t @@ -10,7 +10,7 @@ use Test::More tests => 4; use t::lib::Mocks; BEGIN { - use_ok( 'Koha::Template::Plugin::JSConsents', "Can use Koha::Template::Plugin::JSConsents" ); + use_ok('Koha::Template::Plugin::JSConsents'); } ok( my $consents = Koha::Template::Plugin::JSConsents->new(), 'Able to instantiate template plugin' ); diff --git a/t/db_dependent/Koha/Template/Plugin/KohaPlugins.t b/t/db_dependent/Koha/Template/Plugin/KohaPlugins.t index d8aa7b658e6..3e6e310f934 100755 --- a/t/db_dependent/Koha/Template/Plugin/KohaPlugins.t +++ b/t/db_dependent/Koha/Template/Plugin/KohaPlugins.t @@ -48,7 +48,7 @@ $mock_plugin->mock( } ); -use_ok( 'Koha::Template::Plugin::KohaPlugins', 'Can use Koha::Template::Plugin::KohaPlugins' ); +use_ok('Koha::Template::Plugin::KohaPlugins'); ok( my $plugin = Koha::Template::Plugin::KohaPlugins->new(), 'Able to instantiate template plugin' ); diff --git a/t/db_dependent/Koha/Template/Plugin/TablesSettings.t b/t/db_dependent/Koha/Template/Plugin/TablesSettings.t index a2bca2f640d..1f3899497e1 100755 --- a/t/db_dependent/Koha/Template/Plugin/TablesSettings.t +++ b/t/db_dependent/Koha/Template/Plugin/TablesSettings.t @@ -7,10 +7,13 @@ use C4::Context; use Test::MockModule; use Test::NoWarnings; use Test::More tests => 4; + use t::lib::Mocks; +use Koha::Template::Plugin::TablesSettings; + BEGIN { - use_ok( 'Koha::Template::Plugin::TablesSettings', "Can use Koha::Template::Plugin::TablesSettings" ); + use_ok('Koha::Template::Plugin::TablesSettings'); } ok( my $settings = Koha::Template::Plugin::TablesSettings->new(), 'Able to instantiate template plugin' ); 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/Labels/t_Batch.t b/t/db_dependent/Labels/t_Batch.t index bcf518700bc..3f8734ed198 100755 --- a/t/db_dependent/Labels/t_Batch.t +++ b/t/db_dependent/Labels/t_Batch.t @@ -21,7 +21,7 @@ use Modern::Perl; use Test::NoWarnings; -use Test::More tests => 26; +use Test::More tests => 25; use MARC::Record; use MARC::Field; @@ -30,13 +30,10 @@ use t::lib::TestBuilder; use C4::Context; use C4::Items qw( AddItemBatchFromMarc ); use C4::Biblio qw( GetMarcFromKohaField AddBiblio ); +use C4::Labels::Batch; use Koha::Database; use Koha::Libraries; -BEGIN { - use_ok( 'C4::Labels::Batch', qw( save retrieve delete ) ); -} - my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; my $dbh = C4::Context->dbh; diff --git a/t/db_dependent/Linker_Default.t b/t/db_dependent/Linker_Default.t index bd9cb4269f0..c0b270ba89a 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 406b8bbf69a..167a750ab96 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 21ba67b1b18..2f38cbbe533 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/Matcher.t b/t/db_dependent/Matcher.t index 00840843d13..e83a3a1b7e8 100755 --- a/t/db_dependent/Matcher.t +++ b/t/db_dependent/Matcher.t @@ -25,7 +25,7 @@ use t::lib::TestBuilder; use t::lib::Mocks; use Koha::Database; -use C4::Matcher qw( GetMatcherList GetMatcherId ); +use C4::Matcher; my $schema = Koha::Database->new->schema; my $builder = t::lib::TestBuilder->new; diff --git a/t/db_dependent/SIP/SIPServer.t b/t/db_dependent/SIP/SIPServer.t index db29440afcb..b3936cb7beb 100755 --- a/t/db_dependent/SIP/SIPServer.t +++ b/t/db_dependent/SIP/SIPServer.t @@ -38,7 +38,7 @@ BEGIN { $mockPrefork->mock( 'run', sub { } ); } -use C4::SIP::SIPServer qw( get_timeout ); +use C4::SIP::SIPServer; # Start testing ! # TODO We should include more tests here. diff --git a/t/db_dependent/Search/History.t b/t/db_dependent/Search/History.t index ddb476236ab..ac9a0a73c07 100755 --- a/t/db_dependent/Search/History.t +++ b/t/db_dependent/Search/History.t @@ -18,6 +18,7 @@ use URI::Escape; use List::Util qw( shuffle ); use C4::Context; +use C4::Search::History; use Koha::DateUtils qw( dt_from_string output_pref ); my $schema = Koha::Database->new->schema; @@ -29,7 +30,7 @@ my $dbh = C4::Context->dbh; t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' ); use_ok('Koha::DateUtils'); -use_ok( 'C4::Search::History', qw( add get delete get_from_session ) ); +use_ok('C4::Search::History'); my $userid = 123; my $previous_sessionid = "PREVIOUS_SESSIONID"; diff --git a/t/db_dependent/SocialData.t b/t/db_dependent/SocialData.t index da248e804fe..7ce3d21ab27 100755 --- a/t/db_dependent/SocialData.t +++ b/t/db_dependent/SocialData.t @@ -24,7 +24,7 @@ use Test::More tests => 3; use t::lib::TestBuilder; use Koha::Database; -use C4::SocialData qw( get_data get_report ); +use C4::SocialData; my $schema = Koha::Database->new->schema; my $builder = t::lib::TestBuilder->new; @@ -59,7 +59,8 @@ subtest 'get_report' => sub { is( $report->{'without'}->[0]->{'isbn'}, '9780596526740', 'testing get_report' ); # test if we can get with key instead - $schema->resultset('SocialData')->search( { isbn => '0-596-52674-1' } ) + $schema->resultset('SocialData') + ->search( { isbn => '0-596-52674-1' } ) ->next->update( { isbn => '9780596526740' } ); $report = C4::SocialData::get_report(); is( $report->{with}->[0]->{isbn}, '9780596526740', 'this isbn has social data' ); diff --git a/t/db_dependent/UsageStats.t b/t/db_dependent/UsageStats.t index d5b347ef1f2..d07ad04a3e5 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); @@ -34,7 +34,7 @@ use Koha::Old::Holds; use Koha::Patrons; BEGIN { - use_ok( 'C4::UsageStats', qw( BuildReport ReportToCommunity _count ) ); + use_ok('C4::UsageStats'); } can_ok( 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