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

(-)a/Koha/Illrequest/SupplierUpdate.pm (-6 / +6 lines)
Lines 1-4 Link Here
1
package Koha::Illrequest::SupplierUpdate;
1
package Koha::ILL::Request::SupplierUpdate;
2
2
3
# Copyright 2022 PTFS Europe Ltd
3
# Copyright 2022 PTFS Europe Ltd
4
#
4
#
Lines 21-27 use Modern::Perl; Link Here
21
21
22
=head1 NAME
22
=head1 NAME
23
23
24
Koha::Illrequest::SupplierUpdate - Represents a single request update from a supplier
24
Koha::ILL::Request::SupplierUpdate - Represents a single request update from a supplier
25
25
26
=head1 SYNOPSIS
26
=head1 SYNOPSIS
27
27
Lines 39-51 an update from a supplier Link Here
39
39
40
=head3 new
40
=head3 new
41
41
42
    my $update = Koha::Illrequest::SupplierUpdate->new(
42
    my $update = Koha::ILL::Request::SupplierUpdate->new(
43
        $source_type,
43
        $source_type,
44
        $source_name,
44
        $source_name,
45
        $update
45
        $update
46
    );
46
    );
47
47
48
Create a new Koha::Illrequest::SupplierUpdate object.
48
Create a new Koha::ILL::Request::SupplierUpdate object .
49
49
50
=cut
50
=cut
51
51
Lines 66-72 sub new { Link Here
66
66
67
=head3 attach_processor
67
=head3 attach_processor
68
68
69
    Koha::Illrequest::SupplierUpdate->attach_processor($processor);
69
    Koha::ILL::Request::SupplierUpdate->attach_processor($processor);
70
70
71
Pushes a processor function onto the 'processors' arrayref
71
Pushes a processor function onto the 'processors' arrayref
72
72
Lines 79-85 sub attach_processor { Link Here
79
79
80
=head3 run_processors
80
=head3 run_processors
81
81
82
    Koha::Illrequest::SupplierUpdate->run_processors();
82
    Koha::ILL::Request::SupplierUpdate->run_processors();
83
83
84
Iterates all processors on this object and runs each
84
Iterates all processors on this object and runs each
85
85
(-)a/Koha/Illrequest/SupplierUpdateProcessor.pm (-1 / +1 lines)
Lines 1-4 Link Here
1
package Koha::Illrequest::SupplierUpdateProcessor;
1
package Koha::ILL::Request::SupplierUpdateProcessor;
2
2
3
# Copyright 2022 PTFS Europe Ltd
3
# Copyright 2022 PTFS Europe Ltd
4
#
4
#
(-)a/Koha/Illrequest.pm (-1 / +1 lines)
Lines 1813-1819 sub get_notice { Link Here
1813
1813
1814
=head3 attach_processors
1814
=head3 attach_processors
1815
1815
1816
Receive a Koha::Illrequest::SupplierUpdate and attach
1816
Receive a Koha::ILL::Request::SupplierUpdate and attach
1817
any processors we have for it
1817
any processors we have for it
1818
1818
1819
=cut
1819
=cut
(-)a/misc/process_ill_updates.pl (-1 / +1 lines)
Lines 129-135 while (my $request = $requests->next) { Link Here
129
        # process it
129
        # process it
130
        #
130
        #
131
        # Since each backend's update format is different, it may
131
        # Since each backend's update format is different, it may
132
        # be necessary for a backend to subclass Koha::Illrequest::SupplierUpdate
132
        # be necessary for a backend to subclass Koha::ILL::Request::SupplierUpdate
133
        # so it can provide methods (corresponding to a generic interface) that
133
        # so it can provide methods (corresponding to a generic interface) that
134
        # return pertinent info to core ILL when it is processing updates
134
        # return pertinent info to core ILL when it is processing updates
135
        #
135
        #
(-)a/t/db_dependent/Illrequest/SupplierUpdate.t (-5 / +5 lines)
Lines 20-41 use Modern::Perl; Link Here
20
use Test::MockObject;
20
use Test::MockObject;
21
21
22
use Koha::Illrequest;
22
use Koha::Illrequest;
23
use Koha::Illrequest::SupplierUpdate;
23
use Koha::ILL::Request::SupplierUpdate;
24
24
25
use Test::More tests => 4;
25
use Test::More tests => 4;
26
26
27
use_ok('Koha::Illrequest::SupplierUpdate');
27
use_ok('Koha::ILL::Request::SupplierUpdate');
28
28
29
my $update = Koha::Illrequest::SupplierUpdate->new(
29
my $update = Koha::ILL::Request::SupplierUpdate->new(
30
    'test_type',
30
    'test_type',
31
    'test_name',
31
    'test_name',
32
    'Arbitrary update text'
32
    'Arbitrary update text'
33
);
33
);
34
34
35
isa_ok( $update, 'Koha::Illrequest::SupplierUpdate' );
35
isa_ok( $update, 'Koha::ILL::Request::SupplierUpdate' );
36
36
37
my $processor = Test::MockObject->new;
37
my $processor = Test::MockObject->new;
38
$processor->set_isa('Koha::Illrequest::Processor');
38
$processor->set_isa('Koha::ILL::Request::Processor');
39
$processor->{name} = 'Test processor';
39
$processor->{name} = 'Test processor';
40
$processor->mock('run', sub {
40
$processor->mock('run', sub {
41
    my ( $self, $update, $options, $result ) = @_;
41
    my ( $self, $update, $options, $result ) = @_;
(-)a/t/db_dependent/Illrequests.t (-2 / +1 lines)
Lines 952-958 subtest 'Helpers' => sub { Link Here
952
    my $type = 'test_type_1';
952
    my $type = 'test_type_1';
953
    my $name = 'test_name_1';
953
    my $name = 'test_name_1';
954
    my $update = Test::MockObject->new;
954
    my $update = Test::MockObject->new;
955
    $update->set_isa('Koha::Illrequest::SupplierUpdate');
955
    $update->set_isa('Koha::ILL::Request::SupplierUpdate');
956
    $update->{source_type} = $type;
956
    $update->{source_type} = $type;
957
    $update->{source_name} = $name;
957
    $update->{source_name} = $name;
958
    $update->{processors} = [];
958
    $update->{processors} = [];
959
- 

Return to bug 35581