Lines 27-37
use C4::Context;
Link Here
|
27 |
|
27 |
|
28 |
use Koha::Patrons; |
28 |
use Koha::Patrons; |
29 |
|
29 |
|
30 |
my $dbh = C4::Context->dbh; |
30 |
my $dbh = ''; |
31 |
|
31 |
|
32 |
# Start transaction |
32 |
# Start transaction |
33 |
$dbh->{AutoCommit} = 0; |
33 |
my $database = Koha::Database->new(); |
34 |
$dbh->{RaiseError} = 1; |
34 |
my $schema = $database->schema(); |
|
|
35 |
$schema->storage->txn_begin(); |
35 |
|
36 |
|
36 |
my $builder = t::lib::TestBuilder->new(); |
37 |
my $builder = t::lib::TestBuilder->new(); |
37 |
|
38 |
|
Lines 382-388
sub mock_net_ldap {
Link Here
|
382 |
'search', |
383 |
'search', |
383 |
sub { |
384 |
sub { |
384 |
|
385 |
|
385 |
$remaining_entry = 1 |
386 |
$remaining_entry = 1; |
386 |
|
387 |
|
387 |
return mock_net_ldap_search( |
388 |
return mock_net_ldap_search( |
388 |
{ |
389 |
{ |
Lines 479-484
sub is_admin_bind {
Link Here
|
479 |
return 0; |
480 |
return 0; |
480 |
} |
481 |
} |
481 |
|
482 |
|
482 |
$dbh->rollback; |
483 |
$schema->storage->txn_rollback(); |
483 |
|
484 |
|
484 |
1; |
485 |
1; |
485 |
- |
|
|