Bug 35581: Koha::Illrequest::SupplierUpdate* -> Koha::ILL::Request::SupplierUpdate*
Koha/Illrequest/SupplierUpdate.pm -> Koha/ILL/Request/SupplierUpdate.pm Koha/Illrequest/SupplierUpdateProcessor.pm -> Koha/ILL/Request/SupplierUpdateProcessor.pm Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
1e6717cf9c
commit
5ea2e83700
|
|
@ -1,4 +1,4 @@
|
|||
package Koha::Illrequest::SupplierUpdate;
|
||||
package Koha::ILL::Request::SupplierUpdate;
|
||||
|
||||
# Copyright 2022 PTFS Europe Ltd
|
||||
#
|
||||
|
|
@ -21,7 +21,7 @@ use Modern::Perl;
|
|||
|
||||
=head1 NAME
|
||||
|
||||
Koha::Illrequest::SupplierUpdate - Represents a single request update from a supplier
|
||||
Koha::ILL::Request::SupplierUpdate - Represents a single request update from a supplier
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
|
@ -39,13 +39,13 @@ an update from a supplier
|
|||
|
||||
=head3 new
|
||||
|
||||
my $update = Koha::Illrequest::SupplierUpdate->new(
|
||||
my $update = Koha::ILL::Request::SupplierUpdate->new(
|
||||
$source_type,
|
||||
$source_name,
|
||||
$update
|
||||
);
|
||||
|
||||
Create a new Koha::Illrequest::SupplierUpdate object.
|
||||
Create a new Koha::ILL::Request::SupplierUpdate object .
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ sub new {
|
|||
|
||||
=head3 attach_processor
|
||||
|
||||
Koha::Illrequest::SupplierUpdate->attach_processor($processor);
|
||||
Koha::ILL::Request::SupplierUpdate->attach_processor($processor);
|
||||
|
||||
Pushes a processor function onto the 'processors' arrayref
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ sub attach_processor {
|
|||
|
||||
=head3 run_processors
|
||||
|
||||
Koha::Illrequest::SupplierUpdate->run_processors();
|
||||
Koha::ILL::Request::SupplierUpdate->run_processors();
|
||||
|
||||
Iterates all processors on this object and runs each
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package Koha::Illrequest::SupplierUpdateProcessor;
|
||||
package Koha::ILL::Request::SupplierUpdateProcessor;
|
||||
|
||||
# Copyright 2022 PTFS Europe Ltd
|
||||
#
|
||||
|
|
@ -51,11 +51,11 @@ Create a new Koha::Illrequest::SupplierUpdateProcessor object.
|
|||
|
||||
sub new {
|
||||
my ( $class, $target_source_type, $target_source_name, $processor_name ) = @_;
|
||||
my $self = {};
|
||||
my $self = {};
|
||||
|
||||
$self->{target_source_type} = $target_source_type;
|
||||
$self->{target_source_name} = $target_source_name;
|
||||
$self->{name} = $processor_name;
|
||||
$self->{name} = $processor_name;
|
||||
|
||||
bless $self, $class;
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ Runs the processor
|
|||
=cut
|
||||
|
||||
sub run {
|
||||
my ( $self ) = @_;
|
||||
my ($self) = @_;
|
||||
my ( $package, $filename ) = caller;
|
||||
warn __PACKAGE__ . " run should only be invoked by a subclass\n";
|
||||
}
|
||||
|
|
@ -1852,7 +1852,7 @@ sub get_notice {
|
|||
|
||||
=head3 attach_processors
|
||||
|
||||
Receive a Koha::Illrequest::SupplierUpdate and attach
|
||||
Receive a Koha::ILL::Request::SupplierUpdate and attach
|
||||
any processors we have for it
|
||||
|
||||
=cut
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ while (my $request = $requests->next) {
|
|||
# process it
|
||||
#
|
||||
# Since each backend's update format is different, it may
|
||||
# be necessary for a backend to subclass Koha::Illrequest::SupplierUpdate
|
||||
# be necessary for a backend to subclass Koha::ILL::Request::SupplierUpdate
|
||||
# so it can provide methods (corresponding to a generic interface) that
|
||||
# return pertinent info to core ILL when it is processing updates
|
||||
#
|
||||
|
|
|
|||
|
|
@ -20,22 +20,22 @@ use Modern::Perl;
|
|||
use Test::MockObject;
|
||||
|
||||
use Koha::Illrequest;
|
||||
use Koha::Illrequest::SupplierUpdate;
|
||||
use Koha::ILL::Request::SupplierUpdate;
|
||||
|
||||
use Test::More tests => 4;
|
||||
|
||||
use_ok('Koha::Illrequest::SupplierUpdate');
|
||||
use_ok('Koha::ILL::Request::SupplierUpdate');
|
||||
|
||||
my $update = Koha::Illrequest::SupplierUpdate->new(
|
||||
my $update = Koha::ILL::Request::SupplierUpdate->new(
|
||||
'test_type',
|
||||
'test_name',
|
||||
'Arbitrary update text'
|
||||
);
|
||||
|
||||
isa_ok( $update, 'Koha::Illrequest::SupplierUpdate' );
|
||||
isa_ok( $update, 'Koha::ILL::Request::SupplierUpdate' );
|
||||
|
||||
my $processor = Test::MockObject->new;
|
||||
$processor->set_isa('Koha::Illrequest::Processor');
|
||||
$processor->set_isa('Koha::ILL::Request::Processor');
|
||||
$processor->{name} = 'Test processor';
|
||||
$processor->mock('run', sub {
|
||||
my ( $self, $update, $options, $result ) = @_;
|
||||
|
|
|
|||
|
|
@ -952,7 +952,7 @@ subtest 'Helpers' => sub {
|
|||
my $type = 'test_type_1';
|
||||
my $name = 'test_name_1';
|
||||
my $update = Test::MockObject->new;
|
||||
$update->set_isa('Koha::Illrequest::SupplierUpdate');
|
||||
$update->set_isa('Koha::ILL::Request::SupplierUpdate');
|
||||
$update->{source_type} = $type;
|
||||
$update->{source_name} = $name;
|
||||
$update->{processors} = [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue