Lines 21-31
Link Here
|
21 |
use Modern::Perl; |
21 |
use Modern::Perl; |
22 |
|
22 |
|
23 |
use Test::More tests => 24; |
23 |
use Test::More tests => 24; |
24 |
use C4::Context; |
|
|
25 |
use MARC::Record; |
24 |
use MARC::Record; |
26 |
use MARC::Field; |
25 |
use MARC::Field; |
|
|
26 |
|
27 |
use t::lib::TestBuilder; |
28 |
|
29 |
use C4::Context; |
27 |
use C4::Biblio; |
30 |
use C4::Biblio; |
28 |
use C4::Items; |
31 |
use C4::Items; |
|
|
32 |
use Koha::Libraries; |
29 |
|
33 |
|
30 |
BEGIN { |
34 |
BEGIN { |
31 |
use_ok('C4::Labels::Batch'); |
35 |
use_ok('C4::Labels::Batch'); |
Lines 36-41
my $dbh = C4::Context->dbh;
Link Here
|
36 |
$dbh->{AutoCommit} = 0; |
40 |
$dbh->{AutoCommit} = 0; |
37 |
$dbh->{RaiseError} = 1; |
41 |
$dbh->{RaiseError} = 1; |
38 |
|
42 |
|
|
|
43 |
my $builder = t::lib::TestBuilder->new; |
44 |
$builder->build({ source => 'Branch', value => { branchcode => 'CPL' } }) |
45 |
unless Koha::Libraries->find('CPL'); |
46 |
|
39 |
my $sth = $dbh->prepare('SELECT branchcode FROM branches b LIMIT 0,1'); |
47 |
my $sth = $dbh->prepare('SELECT branchcode FROM branches b LIMIT 0,1'); |
40 |
$sth->execute(); |
48 |
$sth->execute(); |
41 |
my $branch_code = $sth->fetchrow_hashref()->{'branchcode'}; |
49 |
my $branch_code = $sth->fetchrow_hashref()->{'branchcode'}; |
42 |
- |
|
|