Bug 29857: (follow-up) Fix t/db_dependent/Koha/Plugins/Plugins.t

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Fridolin Somers 2022-03-02 07:57:58 -10:00
parent a7d941f31d
commit 85c4ac7582
1 changed files with 4 additions and 4 deletions

View File

@ -108,15 +108,15 @@ subtest 'more call() tests' => sub {
my $bc = 1;
warnings_are
{ Koha::Plugins->call('item_barcode_transform', \$bc); }
[ 'Plugin error (Test Plugin): item_barcode_transform called with parameter: 1',
'Plugin error (Test Plugin for item_barcode_transform): item_barcode_transform called with parameter: 2' ];
[ qq{Plugin error (Test Plugin): Exception 'Koha::Exception' thrown 'item_barcode_transform called with parameter: 1'\n},
qq{Plugin error (Test Plugin for item_barcode_transform): Exception 'Koha::Exception' thrown 'item_barcode_transform called with parameter: 2'\n} ];
is( $bc, 8, "Got expected response" );
my $cn = 'abcd';
warnings_are
{ Koha::Plugins->call('item_barcode_transform', \$bc); }
[ 'Plugin error (Test Plugin): item_barcode_transform called with parameter: 8',
'Plugin error (Test Plugin for item_barcode_transform): item_barcode_transform called with parameter: 16' ];
[ qq{Plugin error (Test Plugin): Exception 'Koha::Exception' thrown 'item_barcode_transform called with parameter: 8'\n},
qq{Plugin error (Test Plugin for item_barcode_transform): Exception 'Koha::Exception' thrown 'item_barcode_transform called with parameter: 16'\n} ];
is( $cn, 'abcd', "Got expected response" );
t::lib::Mocks::mock_config('enable_plugins', 0);