]> git.koha-community.org Git - koha.git/commit
Bug 11891 - Make Koha::Schema use C4::Context->dbh
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 4 Mar 2014 18:26:03 +0000 (13:26 -0500)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 19 Jun 2014 14:54:54 +0000 (11:54 -0300)
commita10f6858e1a1f7096af19845362ded66a4343b33
treecedc8d3f8e001251713e62f8de0a5ebed1af0b9f
parent610b41434704583a51959e52937e4a7170a18258
Bug 11891 - Make Koha::Schema use C4::Context->dbh

Right now there is no connection between the database handles used by
C4::Context::dbh and Koha::Datbase/Schema. This makes it impossible to
use transactions in unit tests to temporarily modify the database to
test subroutines that take advantage of Koha::Database. This patch fixes
that issue.

Test Plan:
1) Apply this patch
2) prove -v t/db_dependent/ILSDI_Services.t and
   prove -v t/db_dependent/Items.t and
   prove -v t/db_dependent/Circulation_issue.t should
   all start passing

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Koha/Database.pm
Koha/Schema.pm
Koha/Storage.pm [new file with mode: 0644]