This patch re-introduces the transaction into t/db_dependent/Items_DelItemCheck.t
and does some cleaning on the touched tests so they raise less warnings.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
use Modern::Perl;
use Test::More tests => 74;
+use Test::MockModule;
use Test::Warn;
use MARC::Record;
}
# a very minimal mack of userenv for use by the test of DelItemCheck
-*C4::Context::userenv = sub {
- return {};
-};
+my $module = new Test::MockModule('C4::Context');
+$module->mock('userenv', sub {
+ { }
+});
my $dbh = C4::Context->dbh;