View | Details | Raw Unified | Return to bug 14334
Collapse All | Expand All

(-)a/t/db_dependent/Branch.t (-3 / +5 lines)
Lines 24-29 use Data::Dumper; Link Here
24
use Test::More tests => 36;
24
use Test::More tests => 36;
25
25
26
use C4::Branch;
26
use C4::Branch;
27
use Koha::Database;
27
28
28
BEGIN {
29
BEGIN {
29
    use FindBin;
30
    use FindBin;
Lines 56-62 can_ok( Link Here
56
57
57
# Start transaction
58
# Start transaction
58
my $dbh = C4::Context->dbh;
59
my $dbh = C4::Context->dbh;
59
$dbh->{AutoCommit} = 0;
60
my $database = Koha::Database->new();
61
my $schema = $database->schema();
62
$schema->storage->txn_begin();
60
$dbh->{RaiseError} = 1;
63
$dbh->{RaiseError} = 1;
61
64
62
# clear the slate
65
# clear the slate
Lines 356-360 my $loop = GetBranchesLoop; Link Here
356
is( scalar(@$loop), GetBranchesCount(), 'There is the right number of branches' );
359
is( scalar(@$loop), GetBranchesCount(), 'There is the right number of branches' );
357
360
358
# End transaction
361
# End transaction
359
$dbh->rollback;
362
$schema->storage->txn_rollback();
360
363
361
- 

Return to bug 14334