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 ) = @_; |