Bug 35548: (follow-up) Fix mock statement for D10

Test plan: Run t/db_dependent/Koha/Plugins/KitchenSink.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Marcel de Rooy 2024-03-25 08:20:09 +00:00 committed by Katrin Fischer
parent 2172c37837
commit cd5ab302b1
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 1 deletions

View File

@ -53,7 +53,9 @@ subtest 'Fun with KitchenSink, Handler->delete' => sub {
push @INC, $plugins_dir;
my $ae = Archive::Extract->new( archive => "$Bin/KitchenSinkPlugin.kpz", type => 'zip' );
$ae->extract( to => $plugins_dir ) or warn "ERROR: " . $ae->error;
my $mock = Test::MockModule->new($module_name)->mock( install => 1 )->mock( uninstall => 1 );
my $mock = Test::MockModule->new($module_name);
$mock->mock( install => 1 );
$mock->mock( uninstall => 1 );
warning_is { Koha::Plugins->new->InstallPlugins; } undef, 'No warnings from InstallPlugins';
ok( Koha::Plugins::Datas->count > $count_d, 'More records in plugin_data' );
ok( Koha::Plugins::Methods->count > $count_m, 'More records in plugin_methods' );