use C4::XISBN;
use C4::Context;
use C4::Search;
+use Koha::Database;
use t::lib::Mocks;
use Test::MockModule;
use_ok('C4::XISBN');
}
-my $dbh = C4::Context->dbh;
-$dbh->{RaiseError} = 1;
-$dbh->{AutoCommit} = 0;
+my $schema = Koha::Database->new->schema;
+$schema->storage->txn_begin;
my $search_module = new Test::MockModule('C4::Search');
"Gets correct biblionumber from a book with a similar isbn using ThingISBN." );
}
-$dbh->rollback;
-
# Util subs
# Add new biblio with isbn and return biblionumber
}
$record->append_fields($biblionumber_field);
- my $indexing_mode = C4::Context->config('zebra_bib_index_mode') // 'dom';
- push @results, ( $indexing_mode eq 'dom' )
- ? $record->as_xml()
- : $record->as_usmarc() ;
+ push @results, $record->as_xml();
return ( undef, \@results, 1 );
}