@@ -, +, @@ --- t/db_dependent/Acquisition.t | 3 --- t/db_dependent/Acquisition/CancelReceipt.t | 2 -- t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t | 3 --- t/db_dependent/Acquisition/GetOrdersByBiblionumber.t | 2 -- t/db_dependent/Acquisition/Invoices.t | 1 - t/db_dependent/Acquisition/NewOrder.t | 2 -- t/db_dependent/Acquisition/OrderFromSubscription.t | 1 - t/db_dependent/Acquisition/TransferOrder.t | 3 --- t/db_dependent/Acquisition/close_reopen_basket.t | 1 - t/db_dependent/Acquisition/populate_order_with_prices.t | 3 --- t/db_dependent/ArticleRequests.t | 1 - t/db_dependent/AudioAlerts.t | 3 --- t/db_dependent/Auth_with_cas.t | 1 - t/db_dependent/Bookseller.t | 1 - t/db_dependent/Circulation.t | 3 --- t/db_dependent/Circulation/GetTopIssues.t | 1 - t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t | 1 - t/db_dependent/CourseReserves.t | 2 -- t/db_dependent/DecreaseLoanHighHolds.t | 2 -- t/db_dependent/Filter_MARC_ViewPolicy.t | 1 - t/db_dependent/Holds/RevertWaitingStatus.t | 1 - t/db_dependent/Installer.t | 2 -- t/db_dependent/Items.t | 2 -- t/db_dependent/Koha/Acquisition/Currencies.t | 4 ---- t/db_dependent/Koha_Misc_Files.t | 1 - t/db_dependent/Letters.t | 1 - t/db_dependent/Letters/TemplateToolkit.t | 1 - t/db_dependent/Members/Attributes.t | 1 - t/db_dependent/Passwordrecovery.t | 3 --- t/db_dependent/Patron/Relationships.t | 5 ----- t/db_dependent/Reports/Guided.t | 1 + t/db_dependent/Serials/Frequency.t | 1 - t/db_dependent/Serials/GetNextSeq.t | 1 - t/db_dependent/Serials/Numberpattern.t | 1 - t/db_dependent/Serials_2.t | 1 - t/db_dependent/ShelfBrowser.t | 1 - t/db_dependent/cronjobs/advance_notices_digest.t | 2 -- 37 files changed, 1 insertion(+), 65 deletions(-) --- a/t/db_dependent/Acquisition.t +++ a/t/db_dependent/Acquisition.t @@ -125,9 +125,6 @@ sub _check_fields_of_orders { my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); -my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; - # Creating some orders my $bookseller = Koha::Acquisition::Bookseller->new( { --- a/t/db_dependent/Acquisition/CancelReceipt.t +++ a/t/db_dependent/Acquisition/CancelReceipt.t @@ -36,8 +36,6 @@ use MARC::Record; my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); -my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; my $builder = t::lib::TestBuilder->new; my $itemtype = $builder->build({ source => 'Itemtype' })->{ itemtype }; --- a/t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t +++ a/t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t @@ -14,9 +14,6 @@ use Koha::Acquisition::Orders; my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); -my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; - my $supplier = Koha::Acquisition::Bookseller->new( { name => 'my vendor', --- a/t/db_dependent/Acquisition/GetOrdersByBiblionumber.t +++ a/t/db_dependent/Acquisition/GetOrdersByBiblionumber.t @@ -14,8 +14,6 @@ use MARC::Record; #Start transaction my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); -my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; my $bookseller = Koha::Acquisition::Bookseller->new( { --- a/t/db_dependent/Acquisition/Invoices.t +++ a/t/db_dependent/Acquisition/Invoices.t @@ -17,7 +17,6 @@ BEGIN { my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; $dbh->do(q{DELETE FROM aqinvoices}); --- a/t/db_dependent/Acquisition/NewOrder.t +++ a/t/db_dependent/Acquisition/NewOrder.t @@ -16,8 +16,6 @@ use t::lib::Mocks; my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); -my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; my $builder = t::lib::TestBuilder->new; my $logged_in_user = $builder->build_object({ class => 'Koha::Patrons' }); --- a/t/db_dependent/Acquisition/OrderFromSubscription.t +++ a/t/db_dependent/Acquisition/OrderFromSubscription.t @@ -17,7 +17,6 @@ my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); my $builder = t::lib::TestBuilder->new; my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; my $curcode = $builder->build({ source => 'Currency' })->{currencycode}; --- a/t/db_dependent/Acquisition/TransferOrder.t +++ a/t/db_dependent/Acquisition/TransferOrder.t @@ -17,9 +17,6 @@ use MARC::Record; my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); -my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; - my $bookseller1 = Koha::Acquisition::Bookseller->new( { name => "my vendor 1", --- a/t/db_dependent/Acquisition/close_reopen_basket.t +++ a/t/db_dependent/Acquisition/close_reopen_basket.t @@ -16,7 +16,6 @@ my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; $dbh->do(q{ DELETE FROM aqorders; --- a/t/db_dependent/Acquisition/populate_order_with_prices.t +++ a/t/db_dependent/Acquisition/populate_order_with_prices.t @@ -13,9 +13,6 @@ use t::lib::Mocks; my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); -my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; - my $builder = t::lib::TestBuilder->new; my $bookseller_inc_tax = Koha::Acquisition::Bookseller->new( --- a/t/db_dependent/ArticleRequests.t +++ a/t/db_dependent/ArticleRequests.t @@ -44,7 +44,6 @@ my $builder = t::lib::TestBuilder->new; our $cache = Koha::Caches->get_instance; my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; $dbh->do("DELETE FROM circulation_rules"); --- a/t/db_dependent/AudioAlerts.t +++ a/t/db_dependent/AudioAlerts.t @@ -27,9 +27,6 @@ BEGIN { my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); -my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; - map { $_->delete() } Koha::AudioAlerts->search(); ## Check the basics --- a/t/db_dependent/Auth_with_cas.t +++ a/t/db_dependent/Auth_with_cas.t @@ -37,7 +37,6 @@ BEGIN { my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; -my $dbh = C4::Context->dbh; C4::Context->disable_syspref_cache(); t::lib::Mocks::mock_preference('OPACBaseURL','http://localhost'); --- a/t/db_dependent/Bookseller.t +++ a/t/db_dependent/Bookseller.t @@ -37,7 +37,6 @@ my $dbh = C4::Context->dbh; my $database = Koha::Database->new(); my $schema = $database->schema(); $schema->storage->txn_begin(); -$dbh->{RaiseError} = 1; my $builder = t::lib::TestBuilder->new; #Start tests --- a/t/db_dependent/Circulation.t +++ a/t/db_dependent/Circulation.t @@ -105,9 +105,6 @@ my $now_value = dt_from_string; my $mocked_datetime = Test::MockModule->new('DateTime'); $mocked_datetime->mock( 'now', sub { return $now_value->clone; } ); -# Start transaction -$dbh->{RaiseError} = 1; - my $cache = Koha::Caches->get_instance(); $dbh->do(q|DELETE FROM special_holidays|); $dbh->do(q|DELETE FROM repeatable_holidays|); --- a/t/db_dependent/Circulation/GetTopIssues.t +++ a/t/db_dependent/Circulation/GetTopIssues.t @@ -35,7 +35,6 @@ my $dbh = $schema->storage->dbh; my $builder = t::lib::TestBuilder->new(); # Start transaction -$dbh->{RaiseError} = 1; $schema->storage->txn_begin(); my $itemtype = $builder->build({ source => 'Itemtype' })->{ itemtype }; --- a/t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t +++ a/t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t @@ -20,7 +20,6 @@ my $schema = Koha::Database->schema; $schema->storage->txn_begin; my $builder = t::lib::TestBuilder->new; my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; my $itemtype = $builder->build({ source => 'Itemtype' })->{itemtype}; --- a/t/db_dependent/CourseReserves.t +++ a/t/db_dependent/CourseReserves.t @@ -34,8 +34,6 @@ BEGIN { my $schema = Koha::Database->schema; $schema->storage->txn_begin; my $builder = t::lib::TestBuilder->new; -my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; my $branchcode = $builder->build( { source => 'Branch' } )->{branchcode}; my $itemtype = $builder->build( --- a/t/db_dependent/DecreaseLoanHighHolds.t +++ a/t/db_dependent/DecreaseLoanHighHolds.t @@ -35,8 +35,6 @@ my $dbh = C4::Context->dbh; my $schema = Koha::Database->new()->schema(); my $builder = t::lib::TestBuilder->new; -# Start transaction -$dbh->{RaiseError} = 1; $schema->storage->txn_begin(); my $now_value = DateTime->now(); --- a/t/db_dependent/Filter_MARC_ViewPolicy.t +++ a/t/db_dependent/Filter_MARC_ViewPolicy.t @@ -41,7 +41,6 @@ my $dbh = C4::Context->dbh; my $database = Koha::Database->new(); my $schema = $database->schema(); -$dbh->{RaiseError} = 1; sub run_hiding_tests { --- a/t/db_dependent/Holds/RevertWaitingStatus.t +++ a/t/db_dependent/Holds/RevertWaitingStatus.t @@ -33,7 +33,6 @@ my $schema = Koha::Database->schema; $schema->storage->txn_begin; my $builder = t::lib::TestBuilder->new; my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; $dbh->do("DELETE FROM reserves"); $dbh->do("DELETE FROM old_reserves"); --- a/t/db_dependent/Installer.t +++ a/t/db_dependent/Installer.t @@ -57,8 +57,6 @@ my $column_name = $column_names[0]; ok( column_exists( 'borrowers', $column_name ), 'Known column does exist' ); ok( ! column_exists( 'borrowers', 'xxx'), 'Column xxx does not exist' ); { - my $dbh = C4::Context->dbh; - $dbh->{RaiseError} = 1; ok( ! column_exists( 'this_table_will_never_exist', 'xxx'), 'Column xxx does not exist, the table does not exist' ); } my @constraint_names = $source->unique_constraint_names(); --- a/t/db_dependent/Items.t +++ a/t/db_dependent/Items.t @@ -73,8 +73,6 @@ subtest 'General Add, Get and Del tests' => sub { # Do not modify anything, and do not explode! - my $dbh = C4::Context->dbh; - local $dbh->{RaiseError} = 1; ModItem({}, $biblio->biblionumber, $itemnumber); # Modify item; setting barcode. --- a/t/db_dependent/Koha/Acquisition/Currencies.t +++ a/t/db_dependent/Koha/Acquisition/Currencies.t @@ -26,10 +26,6 @@ use t::lib::TestBuilder; my $schema = Koha::Database->schema; $schema->storage->txn_begin; -my $dbh = C4::Context->dbh; - -# Start transaction -$dbh->{RaiseError} = 1; my $builder = t::lib::TestBuilder->new; my $nb_of_currencies = Koha::Acquisition::Currencies->search->count; --- a/t/db_dependent/Koha_Misc_Files.t +++ a/t/db_dependent/Koha_Misc_Files.t @@ -14,7 +14,6 @@ BEGIN { my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; -my $dbh = C4::Context->dbh; ## new() parameter handling check is(Koha::Misc::Files->new(), undef, "new() param check test/0"); --- a/t/db_dependent/Letters.t +++ a/t/db_dependent/Letters.t @@ -55,7 +55,6 @@ $schema->storage->txn_begin(); my $builder = t::lib::TestBuilder->new; my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; $dbh->do(q|DELETE FROM letter|); $dbh->do(q|DELETE FROM message_queue|); --- a/t/db_dependent/Letters/TemplateToolkit.t +++ a/t/db_dependent/Letters/TemplateToolkit.t @@ -54,7 +54,6 @@ $schema->storage->txn_begin(); my $builder = t::lib::TestBuilder->new(); my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; $dbh->do(q|DELETE FROM letter|); --- a/t/db_dependent/Members/Attributes.t +++ a/t/db_dependent/Members/Attributes.t @@ -34,7 +34,6 @@ my $schema = Koha::Database->schema; $schema->storage->txn_begin; my $builder = t::lib::TestBuilder->new; my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; $dbh->do(q|DELETE FROM issues|); $dbh->do(q|DELETE FROM borrowers|); --- a/t/db_dependent/Passwordrecovery.t +++ a/t/db_dependent/Passwordrecovery.t @@ -44,9 +44,6 @@ use_ok('Koha::Patron::Password::Recovery'); my $schema = Koha::Database->new()->schema(); $schema->storage->txn_begin(); -my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; - # # Start with fresh data # --- a/t/db_dependent/Patron/Relationships.t +++ a/t/db_dependent/Patron/Relationships.t @@ -30,11 +30,6 @@ BEGIN { use_ok('Koha::Patron::Relationships'); } -# Start transaction -my $dbh = C4::Context->dbh; -$dbh->{AutoCommit} = 0; -$dbh->{RaiseError} = 1; - my $builder = t::lib::TestBuilder->new(); # Father --- a/t/db_dependent/Reports/Guided.t +++ a/t/db_dependent/Reports/Guided.t @@ -260,6 +260,7 @@ subtest 'get_saved_reports' => sub { defined($errors) && exists($errors->{queryerr}), 'attempting to run a report with an SQL syntax error returns error message (Bug 12214)' ); + $dbh->{RaiseError} = 1; is_deeply( get_report_areas(), [ 'CIRC', 'CAT', 'PAT', 'ACQ', 'ACC', 'SER' ], "get_report_areas returns the correct array of report areas"); --- a/t/db_dependent/Serials/Frequency.t +++ a/t/db_dependent/Serials/Frequency.t @@ -7,7 +7,6 @@ use Modern::Perl; my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; -my $dbh = C4::Context->dbh; use C4::Serials::Frequency; --- a/t/db_dependent/Serials/GetNextSeq.t +++ a/t/db_dependent/Serials/GetNextSeq.t @@ -7,7 +7,6 @@ use Koha::Database; my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; -my $dbh = C4::Context->dbh; use C4::Serials::Frequency; use C4::Serials; --- a/t/db_dependent/Serials/Numberpattern.t +++ a/t/db_dependent/Serials/Numberpattern.t @@ -8,7 +8,6 @@ use Koha::Database; my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; -my $dbh = C4::Context->dbh; use C4::Serials::Numberpattern; --- a/t/db_dependent/Serials_2.t +++ a/t/db_dependent/Serials_2.t @@ -29,7 +29,6 @@ my $library2 = $builder->build({ }); my $patron_category = $builder->build({ source => 'Category' }); my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; my $record = MARC::Record->new(); $record->append_fields( --- a/t/db_dependent/ShelfBrowser.t +++ a/t/db_dependent/ShelfBrowser.t @@ -19,7 +19,6 @@ my $schema = Koha::Database->schema; $schema->storage->txn_begin; my $builder = t::lib::TestBuilder->new; my $dbh = C4::Context->dbh; -$dbh->{RaiseError} = 1; $dbh->do(q|DELETE FROM reserves|); $dbh->do(q|DELETE FROM issues|); --- a/t/db_dependent/cronjobs/advance_notices_digest.t +++ a/t/db_dependent/cronjobs/advance_notices_digest.t @@ -39,8 +39,6 @@ my $borrower; sub build_test_objects { - $dbh->{RaiseError} = 1; - # Set only to avoid exception. t::lib::Mocks::mock_preference('dateformat', 'metric'); --