Lines 1-9
Link Here
|
|
|
1 |
#!/usr/bin/env perl |
2 |
|
1 |
use Modern::Perl; |
3 |
use Modern::Perl; |
2 |
|
4 |
|
3 |
use t::lib::Mocks; |
5 |
use t::lib::Mocks; |
4 |
use Test::More tests => 5; # last test to print |
6 |
use Test::More; |
|
|
7 |
use Test::MockModule; |
8 |
|
9 |
use Module::Load::Conditional qw( can_load check_install ); |
10 |
|
11 |
use Koha::Schema; |
12 |
|
13 |
BEGIN { |
14 |
if ( check_install( module => 'Test::DBIx::Class' ) ) { |
15 |
plan tests => 5; |
16 |
} else { |
17 |
plan skip_all => "Need Test::DBIx::Class" |
18 |
} |
19 |
} |
20 |
|
21 |
use Test::DBIx::Class; |
5 |
|
22 |
|
6 |
use Module::Load::Conditional qw( can_load ); |
23 |
my $db = Test::MockModule->new('Koha::Database'); |
|
|
24 |
$db->mock( _new_schema => sub { return Schema(); } ); |
7 |
|
25 |
|
8 |
SKIP: { |
26 |
SKIP: { |
9 |
skip "cannot find WebService::ILS::OverDrive::Patron", 5 |
27 |
skip "cannot find WebService::ILS::OverDrive::Patron", 5 |
10 |
- |
|
|