Bug 13277: (QA followup) use t::lib::Mocks

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Tomas Cohen Arazi 2014-11-19 18:05:26 -03:00
parent 98fcda28ff
commit 95ce6945d8
1 changed files with 2 additions and 7 deletions

View File

@ -26,15 +26,10 @@ use MARC::Record;
use Test::More;
use Test::MockModule;
use DBD::Mock;
use t::lib::Mocks;
# Mock the DB connexion and C4::Context
my $context = new Test::MockModule('C4::Context');
$context->mock( '_new_dbh', sub {
my $dbh = DBI->connect( 'DBI:Mock:', '', '' )
|| die "Cannot create handle: $DBI::errstr\n";
return $dbh;
});
my $context = t::lib::Mocks::mock_dbh;
use_ok('Koha::SuggestionEngine');