diff --git a/t/db_dependent/Koha/Plugins/Patron.t b/t/db_dependent/Koha/Plugins/Patron.t index ebe4531b08..da5382b64d 100755 --- a/t/db_dependent/Koha/Plugins/Patron.t +++ b/t/db_dependent/Koha/Plugins/Patron.t @@ -16,8 +16,10 @@ use Modern::Perl; -use Test::More tests => 5; +use Test::More tests => 6; +use Test::NoWarnings; use Test::Exception; +use Test::MockModule; use File::Basename; @@ -51,6 +53,10 @@ subtest 'check_password hook tests' => sub { my $plugins = Koha::Plugins->new; $plugins->InstallPlugins; + # Mock patron_barcode_transform: we don't want to call it as it generates warnings + my $plugin_mock = Test::MockModule->new("Koha::Plugin::Test"); + $plugin_mock->mock( "patron_barcode_transform", sub { } ); + # Test Plugin enforces a 4 digit numeric pin for passwords my $plugin = Koha::Plugin::Test->new->enable;