@@ -, +, @@ prove t/db_dependent/Linker_FirstMatch.t --- t/lib/Database.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 t/lib/Database.pm --- a/t/lib/Database.pm +++ a/t/lib/Database.pm @@ -0,0 +1,19 @@ +package t::lib::Database; + +use C4::Context; +use Koha::Database; + +sub dbh { + my $dbh = C4::Context->dbh; + my $schema = Koha::Database->new->schema; + $schema->storage->txn_begin; + $dbh->{RaiseError} = 1; + return $dbh; +} + +END { + my $schema = Koha::Database->new->schema; + $schema->storage->txn_rollback; +}; + +1; --