Lines 1-11
Link Here
|
1 |
use Modern::Perl; |
1 |
use Modern::Perl; |
2 |
use Test::More tests => 16; |
2 |
use Test::More tests => 17; |
3 |
use Test::MockModule; |
3 |
use Test::MockModule; |
4 |
|
4 |
|
5 |
use t::lib::Mocks; |
5 |
use t::lib::Mocks; |
6 |
|
6 |
|
7 |
BEGIN { |
7 |
BEGIN { |
8 |
my $context_module = t::lib::Mocks::mock_dbh; |
|
|
9 |
use_ok('C4::Acquisition'); |
8 |
use_ok('C4::Acquisition'); |
10 |
use_ok('C4::Bookseller'); |
9 |
use_ok('C4::Bookseller'); |
11 |
use_ok('C4::Context'); |
10 |
use_ok('C4::Context'); |
Lines 14-19
BEGIN {
Link Here
|
14 |
|
13 |
|
15 |
t::lib::Mocks::mock_preference( 'gist', '0.02|0.05|0.196' ); |
14 |
t::lib::Mocks::mock_preference( 'gist', '0.02|0.05|0.196' ); |
16 |
|
15 |
|
|
|
16 |
use Test::DBIx::Class { |
17 |
schema_class => 'Koha::Schema', |
18 |
connect_info => ['dbi:SQLite:dbname=:memory:','',''], |
19 |
connect_opts => { name_sep => '.', quote_char => '`', }, |
20 |
fixture_class => '::Populate', |
21 |
}, 'Currency' ; |
22 |
|
23 |
my $db = Test::MockModule->new('Koha::Database'); |
24 |
$db->mock( _new_schema => sub { return Schema(); } ); |
25 |
|
26 |
fixtures_ok [ |
27 |
Currency => [ |
28 |
[ qw/ currency symbol rate active / ], |
29 |
[[ 'my_cur', '€', 1, 1, ]], |
30 |
], |
31 |
], 'add currency fixtures'; |
32 |
|
17 |
my $bookseller_module = Test::MockModule->new('Koha::Acquisition::Bookseller'); |
33 |
my $bookseller_module = Test::MockModule->new('Koha::Acquisition::Bookseller'); |
18 |
|
34 |
|
19 |
my ( $basketno_0_0, $basketno_1_1, $basketno_1_0, $basketno_0_1 ); |
35 |
my ( $basketno_0_0, $basketno_1_1, $basketno_1_0, $basketno_0_1 ); |
20 |
- |
|
|