View | Details | Raw Unified | Return to bug 35581
Collapse All | Expand All

(-)a/Koha/Illrequest/Config.pm (-4 / +4 lines)
Lines 1-4 Link Here
1
package Koha::Illrequest::Config;
1
package Koha::ILL::Request::Config;
2
2
3
# Copyright 2013,2014 PTFS Europe Ltd
3
# Copyright 2013,2014 PTFS Europe Ltd
4
#
4
#
Lines 27-33 use List::MoreUtils qw( uniq ); Link Here
27
27
28
=head1 NAME
28
=head1 NAME
29
29
30
Koha::Illrequest::Config - Koha ILL Configuration Object
30
Koha::ILL::Request::Config - Koha ILL Configuration Object
31
31
32
=head1 SYNOPSIS
32
=head1 SYNOPSIS
33
33
Lines 54-62 The config file also provides mappings for Record Object accessors. Link Here
54
54
55
=head3 new
55
=head3 new
56
56
57
    my $config = Koha::Illrequest::Config->new();
57
    my $config = Koha::ILL::Request::Config->new();
58
58
59
Create a new Koha::Illrequest::Config object, with mapping data loaded from the
59
Create a new Koha::ILL::Request::Config object, with mapping data loaded from the
60
ILL configuration file.
60
ILL configuration file.
61
61
62
=cut
62
=cut
(-)a/Koha/Illrequest.pm (-1 / +1 lines)
Lines 536-542 sub _config { Link Here
536
    $self->{_my_config} = $config if ( $config );
536
    $self->{_my_config} = $config if ( $config );
537
    # Load our config object, as late as possible.
537
    # Load our config object, as late as possible.
538
    unless ( $self->{_my_config} ) {
538
    unless ( $self->{_my_config} ) {
539
        $self->{_my_config} = Koha::Illrequest::Config->new;
539
        $self->{_my_config} = Koha::ILL::Request::Config->new;
540
    }
540
    }
541
    return $self->{_my_config};
541
    return $self->{_my_config};
542
}
542
}
(-)a/Koha/Illrequests.pm (-2 / +2 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::Illrequest;
23
use Koha::Illrequest;
24
use Koha::Illrequest::Config;
24
use Koha::ILL::Request::Config;
25
25
26
use base qw(Koha::Objects);
26
use base qw(Koha::Objects);
27
27
Lines 50-56 sub new { Link Here
50
50
51
    my $self = $class->SUPER::new($class, $attributes);
51
    my $self = $class->SUPER::new($class, $attributes);
52
52
53
    my $config = Koha::Illrequest::Config->new; # <- Necessary
53
    my $config = Koha::ILL::Request::Config->new; # <- Necessary
54
    $self->{_config} = $config;                 # <- Necessary
54
    $self->{_config} = $config;                 # <- Necessary
55
55
56
    return $self;
56
    return $self;
(-)a/Koha/REST/V1/ILL/Backends.pm (-2 / +2 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use Mojo::Base 'Mojolicious::Controller';
20
use Mojo::Base 'Mojolicious::Controller';
21
21
22
use Koha::Illrequest::Config;
22
use Koha::ILL::Request::Config;
23
use Koha::Illrequests;
23
use Koha::Illrequests;
24
use Koha::ILL::Backend;
24
use Koha::ILL::Backend;
25
25
Lines 38-44 Return a list of available ILL backends and its capabilities Link Here
38
sub list {
38
sub list {
39
    my $c = shift->openapi->valid_input;
39
    my $c = shift->openapi->valid_input;
40
40
41
    my $config   = Koha::Illrequest::Config->new;
41
    my $config   = Koha::ILL::Request::Config->new;
42
    my $backends = $config->available_backends;
42
    my $backends = $config->available_backends;
43
43
44
    my @data;
44
    my @data;
(-)a/about.pl (-2 / +2 lines)
Lines 53-59 use Koha::Patron::Categories; Link Here
53
use Koha::Patrons;
53
use Koha::Patrons;
54
use Koha::Caches;
54
use Koha::Caches;
55
use Koha::Config::SysPrefs;
55
use Koha::Config::SysPrefs;
56
use Koha::Illrequest::Config;
56
use Koha::ILL::Request::Config;
57
use Koha::SearchEngine::Elasticsearch;
57
use Koha::SearchEngine::Elasticsearch;
58
use Koha::Logger;
58
use Koha::Logger;
59
use Koha::Filter::MARC::ViewPolicy;
59
use Koha::Filter::MARC::ViewPolicy;
Lines 300-306 unless ( Koha::I18N->_base_directory ) { Link Here
300
if ( C4::Context->preference('ILLModule') ) {
300
if ( C4::Context->preference('ILLModule') ) {
301
    my $warnILLConfiguration = 0;
301
    my $warnILLConfiguration = 0;
302
    my $ill_config_from_file = C4::Context->config("interlibrary_loans");
302
    my $ill_config_from_file = C4::Context->config("interlibrary_loans");
303
    my $ill_config = Koha::Illrequest::Config->new;
303
    my $ill_config = Koha::ILL::Request::Config->new;
304
304
305
    my $available_ill_backends =
305
    my $available_ill_backends =
306
      ( scalar @{ $ill_config->available_backends } > 0 );
306
      ( scalar @{ $ill_config->available_backends } > 0 );
(-)a/ill/ill-requests.pl (-1 / +1 lines)
Lines 62-68 my ( $template, $patronnumber, $cookie ) = get_template_and_user( { Link Here
62
} );
62
} );
63
63
64
# Are we able to actually work?
64
# Are we able to actually work?
65
my $cfg = Koha::Illrequest::Config->new;
65
my $cfg = Koha::ILL::Request::Config->new;
66
my $backends = $cfg->available_backends;
66
my $backends = $cfg->available_backends;
67
my $has_branch = $cfg->has_branch;
67
my $has_branch = $cfg->has_branch;
68
my $backends_available = ( scalar @{$backends} > 0 );
68
my $backends_available = ( scalar @{$backends} > 0 );
(-)a/misc/process_ill_updates.pl (-1 / +1 lines)
Lines 58-64 if (!$backend) { Link Here
58
}
58
}
59
59
60
# First check we can proceed
60
# First check we can proceed
61
my $cfg = Koha::Illrequest::Config->new;
61
my $cfg = Koha::ILL::Request::Config->new;
62
my $backends = $cfg->available_backends;
62
my $backends = $cfg->available_backends;
63
my $has_branch = $cfg->has_branch;
63
my $has_branch = $cfg->has_branch;
64
my $backends_available = ( scalar @{$backends} > 0 );
64
my $backends_available = ( scalar @{$backends} > 0 );
(-)a/opac/opac-illrequests.pl (-2 / +2 lines)
Lines 27-33 use C4::Koha; Link Here
27
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output qw( output_html_with_http_headers );
28
use POSIX qw( strftime );
28
use POSIX qw( strftime );
29
29
30
use Koha::Illrequest::Config;
30
use Koha::ILL::Request::Config;
31
use Koha::Illrequests;
31
use Koha::Illrequests;
32
use Koha::Libraries;
32
use Koha::Libraries;
33
use Koha::Patrons;
33
use Koha::Patrons;
Lines 55-61 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ Link Here
55
55
56
# Are we able to actually work?
56
# Are we able to actually work?
57
my $reduced  = C4::Context->preference('ILLOpacbackends');
57
my $reduced  = C4::Context->preference('ILLOpacbackends');
58
my $backends = Koha::Illrequest::Config->new->available_backends($reduced);
58
my $backends = Koha::ILL::Request::Config->new->available_backends($reduced);
59
my $backends_available = ( scalar @{$backends} > 0 );
59
my $backends_available = ( scalar @{$backends} > 0 );
60
$template->param( backends_available => $backends_available );
60
$template->param( backends_available => $backends_available );
61
my $patron = Koha::Patrons->find($loggedinuser);
61
my $patron = Koha::Patrons->find($loggedinuser);
(-)a/t/db_dependent/Illrequests.t (-2 / +2 lines)
Lines 23-29 use C4::Circulation qw( AddIssue AddReturn ); Link Here
23
23
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::ILL::Request::Attributes;
25
use Koha::ILL::Request::Attributes;
26
use Koha::Illrequest::Config;
26
use Koha::ILL::Request::Config;
27
use Koha::Biblios;
27
use Koha::Biblios;
28
use Koha::Patrons;
28
use Koha::Patrons;
29
use Koha::ItemTypes;
29
use Koha::ItemTypes;
Lines 60-66 subtest 'Basic object tests' => sub { Link Here
60
60
61
    isa_ok($illrq_obj, 'Koha::Illrequest',
61
    isa_ok($illrq_obj, 'Koha::Illrequest',
62
           "Correctly create and load an illrequest object.");
62
           "Correctly create and load an illrequest object.");
63
    isa_ok($illrq_obj->_config, 'Koha::Illrequest::Config',
63
    isa_ok($illrq_obj->_config, 'Koha::ILL::Request::Config',
64
           "Created a config object as part of Illrequest creation.");
64
           "Created a config object as part of Illrequest creation.");
65
65
66
    is($illrq_obj->illrequest_id, $illrq->{illrequest_id},
66
    is($illrq_obj->illrequest_id, $illrq->{illrequest_id},
(-)a/t/db_dependent/Koha/ILL/Comments.t (-1 / +1 lines)
Lines 21-27 use File::Basename qw/basename/; Link Here
21
use Koha::Database;
21
use Koha::Database;
22
use Koha::Illrequests;
22
use Koha::Illrequests;
23
use Koha::ILL::Request::Attributes;
23
use Koha::ILL::Request::Attributes;
24
use Koha::Illrequest::Config;
24
use Koha::ILL::Request::Config;
25
use Koha::Patrons;
25
use Koha::Patrons;
26
use t::lib::Mocks;
26
use t::lib::Mocks;
27
use t::lib::TestBuilder;
27
use t::lib::TestBuilder;
(-)a/t/db_dependent/Illrequest/Config.t (-27 / +27 lines)
Lines 27-33 use Test::More tests => 5; Link Here
27
27
28
my $schema = Koha::Database->new->schema;
28
my $schema = Koha::Database->new->schema;
29
my $builder = t::lib::TestBuilder->new;
29
my $builder = t::lib::TestBuilder->new;
30
use_ok('Koha::Illrequest::Config');
30
use_ok('Koha::ILL::Request::Config');
31
31
32
my $base_limits = {
32
my $base_limits = {
33
    branch => { CPL => { count => 1, method => 'annual' } },
33
    branch => { CPL => { count => 1, method => 'annual' } },
Lines 46-53 subtest 'Basics' => sub { Link Here
46
    t::lib::Mocks::mock_config("interlibrary_loans", {});
46
    t::lib::Mocks::mock_config("interlibrary_loans", {});
47
    t::lib::Mocks::mock_preference('ILLPartnerCode', undef);
47
    t::lib::Mocks::mock_preference('ILLPartnerCode', undef);
48
48
49
    my $config = Koha::Illrequest::Config->new;
49
    my $config = Koha::ILL::Request::Config->new;
50
    isa_ok($config, "Koha::Illrequest::Config",
50
    isa_ok($config, "Koha::ILL::Request::Config",
51
           "Correctly create and load a config object.");
51
           "Correctly create and load a config object.");
52
52
53
    # backend:
53
    # backend:
Lines 98-119 subtest '_load_unit_config' => sub { Link Here
98
98
99
    $schema->storage->txn_begin;
99
    $schema->storage->txn_begin;
100
100
101
    my $config = Koha::Illrequest::Config->new;
101
    my $config = Koha::ILL::Request::Config->new;
102
102
103
    dies_ok(
103
    dies_ok(
104
        sub { Koha::Illrequest::Config::_load_unit_config({
104
        sub { Koha::ILL::Request::Config::_load_unit_config({
105
            id => 'durineadu', type => 'baz'
105
            id => 'durineadu', type => 'baz'
106
        }) },
106
        }) },
107
        "_load_unit_config: die if ID is not default, and type is not branch or brw_cat."
107
        "_load_unit_config: die if ID is not default, and type is not branch or brw_cat."
108
    );
108
    );
109
    is_deeply(
109
    is_deeply(
110
        Koha::Illrequest::Config::_load_unit_config({
110
        Koha::ILL::Request::Config::_load_unit_config({
111
            unit => {}, id => 'default', config => {}, test => 1
111
            unit => {}, id => 'default', config => {}, test => 1
112
        }), {}, "_load_unit_config: invocation without id returns unmodified config."
112
        }), {}, "_load_unit_config: invocation without id returns unmodified config."
113
    );
113
    );
114
114
115
    is_deeply(
115
    is_deeply(
116
        Koha::Illrequest::Config::_load_unit_config({
116
        Koha::ILL::Request::Config::_load_unit_config({
117
            unit => { api_key => 'foo', api_auth => 'bar' },
117
            unit => { api_key => 'foo', api_auth => 'bar' },
118
            id => "CPL", type => 'branch', config => {}
118
            id => "CPL", type => 'branch', config => {}
119
        }),
119
        }),
Lines 123-141 subtest '_load_unit_config' => sub { Link Here
123
123
124
    # Populate request_limits
124
    # Populate request_limits
125
    is_deeply(
125
    is_deeply(
126
        Koha::Illrequest::Config::_load_unit_config({
126
        Koha::ILL::Request::Config::_load_unit_config({
127
            unit => { request_limit => [ 'heelo', 1234 ] },
127
            unit => { request_limit => [ 'heelo', 1234 ] },
128
            id => "CPL", type => 'branch', config => {}
128
            id => "CPL", type => 'branch', config => {}
129
        }), {}, "_load_unit_config: invalid request_limit structure."
129
        }), {}, "_load_unit_config: invalid request_limit structure."
130
    );
130
    );
131
    is_deeply(
131
    is_deeply(
132
        Koha::Illrequest::Config::_load_unit_config({
132
        Koha::ILL::Request::Config::_load_unit_config({
133
            unit => { request_limit => { method => 'eudiren', count => '-5465' } },
133
            unit => { request_limit => { method => 'eudiren', count => '-5465' } },
134
            id => "CPL", type => 'branch', config => {}
134
            id => "CPL", type => 'branch', config => {}
135
        }), {}, "_load_unit_config: invalid method & count."
135
        }), {}, "_load_unit_config: invalid method & count."
136
    );
136
    );
137
    is_deeply(
137
    is_deeply(
138
        Koha::Illrequest::Config::_load_unit_config({
138
        Koha::ILL::Request::Config::_load_unit_config({
139
            unit => { request_limit => { method => 'annual', count => 6 } },
139
            unit => { request_limit => { method => 'annual', count => 6 } },
140
            id => "default", config => {}
140
            id => "default", config => {}
141
        }),
141
        }),
Lines 145-151 subtest '_load_unit_config' => sub { Link Here
145
145
146
    # Populate prefix
146
    # Populate prefix
147
    is_deeply(
147
    is_deeply(
148
        Koha::Illrequest::Config::_load_unit_config({
148
        Koha::ILL::Request::Config::_load_unit_config({
149
            unit => { prefix => 'Foo-ill' },
149
            unit => { prefix => 'Foo-ill' },
150
            id => "default", config => {}
150
            id => "default", config => {}
151
        }),
151
        }),
Lines 153-159 subtest '_load_unit_config' => sub { Link Here
153
        "_load_unit_config: correct default prefix."
153
        "_load_unit_config: correct default prefix."
154
    );
154
    );
155
    is_deeply(
155
    is_deeply(
156
        Koha::Illrequest::Config::_load_unit_config({
156
        Koha::ILL::Request::Config::_load_unit_config({
157
            unit => { prefix => 'Foo-ill' },
157
            unit => { prefix => 'Foo-ill' },
158
            id => "A", config => {}, type => 'brw_cat'
158
            id => "A", config => {}, type => 'brw_cat'
159
        }),
159
        }),
Lines 163-169 subtest '_load_unit_config' => sub { Link Here
163
163
164
    # Populate digital_recipient
164
    # Populate digital_recipient
165
    is_deeply(
165
    is_deeply(
166
        Koha::Illrequest::Config::_load_unit_config({
166
        Koha::ILL::Request::Config::_load_unit_config({
167
            unit => { digital_recipient => 'borrower' },
167
            unit => { digital_recipient => 'borrower' },
168
            id => "default", config => {}
168
            id => "default", config => {}
169
        }),
169
        }),
Lines 171-177 subtest '_load_unit_config' => sub { Link Here
171
        "_load_unit_config: correct default digital_recipient."
171
        "_load_unit_config: correct default digital_recipient."
172
    );
172
    );
173
    is_deeply(
173
    is_deeply(
174
        Koha::Illrequest::Config::_load_unit_config({
174
        Koha::ILL::Request::Config::_load_unit_config({
175
            unit => { digital_recipient => 'branch' },
175
            unit => { digital_recipient => 'branch' },
176
            id => "A", config => {}, type => 'brw_cat'
176
            id => "A", config => {}, type => 'brw_cat'
177
        }),
177
        }),
Lines 198-209 subtest '_load_configuration' => sub { Link Here
198
198
199
    $schema->storage->txn_begin;
199
    $schema->storage->txn_begin;
200
200
201
    my $config = Koha::Illrequest::Config->new;
201
    my $config = Koha::ILL::Request::Config->new;
202
    t::lib::Mocks::mock_preference('ILLPartnerCode', 'IL');
202
    t::lib::Mocks::mock_preference('ILLPartnerCode', 'IL');
203
203
204
    # Return basic configuration
204
    # Return basic configuration
205
    is_deeply(
205
    is_deeply(
206
        Koha::Illrequest::Config::_load_configuration({}, 0),
206
        Koha::ILL::Request::Config::_load_configuration( {}, 0 ),
207
        {
207
        {
208
            backend_directory  => undef,
208
            backend_directory  => undef,
209
            censorship         => {
209
            censorship         => {
Lines 221-227 subtest '_load_configuration' => sub { Link Here
221
221
222
    # Return correct backend_dir
222
    # Return correct backend_dir
223
    is_deeply(
223
    is_deeply(
224
        Koha::Illrequest::Config::_load_configuration({ backend_directory => '/tmp/' }, 0),
224
        Koha::ILL::Request::Config::_load_configuration( { backend_directory => '/tmp/' }, 0 ),
225
        {
225
        {
226
            backend_directory  => '/tmp/',
226
            backend_directory  => '/tmp/',
227
            censorship         => {
227
            censorship         => {
Lines 247-253 subtest '_load_configuration' => sub { Link Here
247
        ]
247
        ]
248
    };
248
    };
249
    is_deeply(
249
    is_deeply(
250
        Koha::Illrequest::Config::_load_configuration($xml_config, 0),
250
        Koha::ILL::Request::Config::_load_configuration( $xml_config, 0 ),
251
        {
251
        {
252
            backend_directory  => '/tmp/',
252
            backend_directory  => '/tmp/',
253
            censorship         => {
253
            censorship         => {
Lines 273-279 subtest '_load_configuration' => sub { Link Here
273
        }
273
        }
274
    };
274
    };
275
    is_deeply(
275
    is_deeply(
276
        Koha::Illrequest::Config::_load_configuration($xml_config, 0),
276
        Koha::ILL::Request::Config::_load_configuration( $xml_config, 0 ),
277
        {
277
        {
278
            backend_directory  => '/tmp/',
278
            backend_directory  => '/tmp/',
279
            censorship         => {
279
            censorship         => {
Lines 299-305 subtest '_load_configuration' => sub { Link Here
299
        ]
299
        ]
300
    };
300
    };
301
    is_deeply(
301
    is_deeply(
302
        Koha::Illrequest::Config::_load_configuration($xml_config, 0),
302
        Koha::ILL::Request::Config::_load_configuration( $xml_config, 0 ),
303
        {
303
        {
304
            backend_directory  => '/tmp/',
304
            backend_directory  => '/tmp/',
305
            censorship         => {
305
            censorship         => {
Lines 325-331 subtest '_load_configuration' => sub { Link Here
325
        }
325
        }
326
    };
326
    };
327
    is_deeply(
327
    is_deeply(
328
        Koha::Illrequest::Config::_load_configuration($xml_config, 0),
328
        Koha::ILL::Request::Config::_load_configuration( $xml_config, 0 ),
329
        {
329
        {
330
            backend_directory  => '/tmp/',
330
            backend_directory  => '/tmp/',
331
            censorship         => {
331
            censorship         => {
Lines 349-355 subtest '_load_configuration' => sub { Link Here
349
        digital_recipient => 'branch',
349
        digital_recipient => 'branch',
350
    };
350
    };
351
    is_deeply(
351
    is_deeply(
352
        Koha::Illrequest::Config::_load_configuration($xml_config, 0),
352
        Koha::ILL::Request::Config::_load_configuration( $xml_config, 0 ),
353
        {
353
        {
354
            backend_directory  => '/tmp/',
354
            backend_directory  => '/tmp/',
355
            censorship         => {
355
            censorship         => {
Lines 372-378 subtest '_load_configuration' => sub { Link Here
372
        reply_date => 'hide'
372
        reply_date => 'hide'
373
    };
373
    };
374
    is_deeply(
374
    is_deeply(
375
        Koha::Illrequest::Config::_load_configuration($xml_config, 0),
375
        Koha::ILL::Request::Config::_load_configuration( $xml_config, 0 ),
376
        {
376
        {
377
            backend_directory  => '/tmp/',
377
            backend_directory  => '/tmp/',
378
            censorship         => {
378
            censorship         => {
Lines 390-396 subtest '_load_configuration' => sub { Link Here
390
390
391
    # Partner library category
391
    # Partner library category
392
    is_deeply(
392
    is_deeply(
393
        Koha::Illrequest::Config::_load_configuration( { partner_code => 'FOOBAR' } ),
393
        Koha::ILL::Request::Config::_load_configuration( { partner_code => 'FOOBAR' } ),
394
        {
394
        {
395
            backend_directory => undef,
395
            backend_directory => undef,
396
            censorship        => {
396
            censorship        => {
Lines 409-415 subtest '_load_configuration' => sub { Link Here
409
    t::lib::Mocks::mock_preference( 'ILLPartnerCode', 'FOOBAR' );
409
    t::lib::Mocks::mock_preference( 'ILLPartnerCode', 'FOOBAR' );
410
410
411
    is_deeply(
411
    is_deeply(
412
        Koha::Illrequest::Config::_load_configuration(),
412
        Koha::ILL::Request::Config::_load_configuration(),
413
        {
413
        {
414
            backend_directory => undef,
414
            backend_directory => undef,
415
            censorship        => {
415
            censorship        => {
Lines 437-443 subtest 'Final tests' => sub { Link Here
437
437
438
    t::lib::Mocks::mock_config("interlibrary_loans", {});
438
    t::lib::Mocks::mock_config("interlibrary_loans", {});
439
439
440
    my $config = Koha::Illrequest::Config->new;
440
    my $config = Koha::ILL::Request::Config->new;
441
441
442
    # getPrefixes (error & undef):
442
    # getPrefixes (error & undef):
443
    is($config->getPrefixes(), undef,
443
    is($config->getPrefixes(), undef,
Lines 453-459 subtest 'Final tests' => sub { Link Here
453
    is_deeply($config->getDigitalRecipients("branch"), { default => undef},
453
    is_deeply($config->getDigitalRecipients("branch"), { default => undef},
454
              "getDigitalRecipients: Undefined branch dig rec is undefined.");
454
              "getDigitalRecipients: Undefined branch dig rec is undefined.");
455
455
456
    $config->{configuration} = Koha::Illrequest::Config::_load_configuration({
456
    $config->{configuration} = Koha::ILL::Request::Config::_load_configuration({
457
            backend_directory => '/tmp/',
457
            backend_directory => '/tmp/',
458
            prefix => 'DEFAULT-prefix',
458
            prefix => 'DEFAULT-prefix',
459
            digital_recipient => 'branch',
459
            digital_recipient => 'branch',
(-)a/t/db_dependent/api/v1/ill_backends.t (-2 / +2 lines)
Lines 40-47 subtest 'list() tests' => sub { Link Here
40
40
41
    plan tests => 16;
41
    plan tests => 16;
42
42
43
    # Mock Illrequest::Config (as module)
43
    # Mock ILL::Request::Config (as module)
44
    my $illconfig_module = Test::MockModule->new('Koha::Illrequest::Config');
44
    my $illconfig_module = Test::MockModule->new('Koha::ILL::Request::Config');
45
45
46
    # Start with no backends installed
46
    # Start with no backends installed
47
    $illconfig_module->mock( 'available_backends', sub { () } );
47
    $illconfig_module->mock( 'available_backends', sub { () } );
(-)a/t/db_dependent/api/v1/ill_requests.t (-3 / +2 lines)
Lines 217-226 subtest 'list() tests' => sub { Link Here
217
      ->json_has('/0/comments', $comment_text);
217
      ->json_has('/0/comments', $comment_text);
218
218
219
    # x-koha-embed: id_prefix
219
    # x-koha-embed: id_prefix
220
    # Mock Illrequest::Config to return a static prefix
220
    # Mock ILL::Request::Config to return a static prefix
221
    my $id_prefix = 'ILL';
221
    my $id_prefix = 'ILL';
222
    my $config = Test::MockObject->new;
222
    my $config = Test::MockObject->new;
223
    $config->set_isa('Koha::Illrequest::Config::Mock');
223
    $config->set_isa('Koha::ILL::Request::Config::Mock');
224
    $config->set_always('getPrefixes', $id_prefix);
224
    $config->set_always('getPrefixes', $id_prefix);
225
225
226
    # Make sure id_prefix comes back
226
    # Make sure id_prefix comes back
227
- 

Return to bug 35581