Lines 6-11
Link Here
|
6 |
use strict; |
6 |
use strict; |
7 |
use warnings; |
7 |
use warnings; |
8 |
|
8 |
|
|
|
9 |
use C4::Context; |
10 |
use C4::Biblio; |
9 |
use Test::More tests => 15; |
11 |
use Test::More tests => 15; |
10 |
use Test::MockModule; |
12 |
use Test::MockModule; |
11 |
use Test::Warn; |
13 |
use Test::Warn; |
Lines 192-204
is_deeply(
Link Here
|
192 |
|
194 |
|
193 |
$module->unmock_all(); |
195 |
$module->unmock_all(); |
194 |
|
196 |
|
195 |
use C4::Context; |
|
|
196 |
use C4::Biblio; |
197 |
|
198 |
my $dbh = C4::Context->dbh; |
199 |
$dbh->{AutoCommit} = 0; |
200 |
$dbh->{RaiseError} = 1; |
201 |
|
202 |
# Start testing C4::AuthoritiesMarc::merge |
197 |
# Start testing C4::AuthoritiesMarc::merge |
203 |
|
198 |
|
204 |
# Create authority type TEST_PERSO |
199 |
# Create authority type TEST_PERSO |
Lines 246-253
$zoom_resultset->mock('destroy', undef);
Link Here
|
246 |
my $zoom_record = new Test::MockModule('ZOOM::Record', no_auto => 1); |
241 |
my $zoom_record = new Test::MockModule('ZOOM::Record', no_auto => 1); |
247 |
$zoom_record->mock('raw', sub { |
242 |
$zoom_record->mock('raw', sub { |
248 |
my $this = shift; |
243 |
my $this = shift; |
|
|
244 |
my $sqlfield = C4::Context->config('zebra_bib_index_mode') eq 'dom' ? 'marcxml' : 'marc'; |
249 |
my $marcs = $dbh->selectcol_arrayref( |
245 |
my $marcs = $dbh->selectcol_arrayref( |
250 |
'SELECT marc FROM biblioitems WHERE biblionumber = ?', {}, |
246 |
"SELECT $sqlfield FROM biblioitems WHERE biblionumber = ?", {}, |
251 |
$this->{_rec}->{biblionumber}); |
247 |
$this->{_rec}->{biblionumber}); |
252 |
return $marcs->[0]; |
248 |
return $marcs->[0]; |
253 |
}); |
249 |
}); |
254 |
- |
|
|