Lines 1-14
Link Here
|
1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
2 |
# |
2 |
# |
3 |
# This Koha test module is a stub! |
3 |
# This Koha test module is a stub! |
4 |
# Add more tests here!!! |
4 |
# Add more tests here!!! |
5 |
|
5 |
|
6 |
use strict; |
6 |
use strict; |
7 |
use warnings; |
7 |
use warnings; |
8 |
|
8 |
|
9 |
use Test::More tests => 1; |
9 |
use Test::More tests => 1; |
|
|
10 |
use Test::MockModule; |
11 |
use DBD::Mock; |
12 |
|
13 |
my $module_context = new Test::MockModule('C4::Context'); |
14 |
$module_context->mock( |
15 |
'_new_dbh', |
16 |
sub { |
17 |
my $dbh = DBI->connect( 'DBI:Mock:', '', '' ) |
18 |
|| die "Cannot create handle: $DBI::errstr\n"; |
19 |
return $dbh; |
20 |
} |
21 |
); |
22 |
|
23 |
use_ok('C4::ILSDI::Services'); |
10 |
|
24 |
|
11 |
BEGIN { |
|
|
12 |
use_ok('C4::ILSDI::Services'); |
13 |
} |
14 |
|
25 |
|
15 |
- |
|
|