|
Lines 572-579
subtest 'Backend testing (mocks)' => sub {
Link Here
|
| 572 |
# the Dummy plugin installed. load_backend & available_backends don't |
572 |
# the Dummy plugin installed. load_backend & available_backends don't |
| 573 |
# currently have tests as a result. |
573 |
# currently have tests as a result. |
| 574 |
|
574 |
|
| 575 |
my $categorycode = $builder->build({ source => 'Category' })->{categorycode}; |
575 |
my $categorycode = $builder->build({ source => 'Category' })->{categorycode}; |
| 576 |
my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; |
576 |
my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; |
| 577 |
|
577 |
|
| 578 |
my $backend = Test::MockObject->new; |
578 |
my $backend = Test::MockObject->new; |
| 579 |
$backend->set_isa('Koha::Illbackends::Mock'); |
579 |
$backend->set_isa('Koha::Illbackends::Mock'); |
|
Lines 589-595
subtest 'Backend testing (mocks)' => sub {
Link Here
|
| 589 |
$config->set_always('backend_dir', 'a_dir'); |
589 |
$config->set_always('backend_dir', 'a_dir'); |
| 590 |
|
590 |
|
| 591 |
$illrq->_backend($backend); |
591 |
$illrq->_backend($backend); |
| 592 |
$illrq->_config($config); |
592 |
$illrq->_config($config); |
| 593 |
|
593 |
|
| 594 |
isa_ok($illrq->_backend, 'Koha::Illbackends::Mock', |
594 |
isa_ok($illrq->_backend, 'Koha::Illbackends::Mock', |
| 595 |
"OK accessing mocked backend."); |
595 |
"OK accessing mocked backend."); |
|
Lines 668-674
subtest 'Backend testing (mocks)' => sub {
Link Here
|
| 668 |
} |
668 |
} |
| 669 |
)->store(); |
669 |
)->store(); |
| 670 |
|
670 |
|
| 671 |
my $part = $illrq->requested_partners(1); |
671 |
my $part = $illrq->requested_partners(1); |
| 672 |
isa_ok($part, 'ARRAY', |
672 |
isa_ok($part, 'ARRAY', |
| 673 |
"requested_partners returns array when requested"); |
673 |
"requested_partners returns array when requested"); |
| 674 |
isa_ok(@{$part}[0], 'HASH', |
674 |
isa_ok(@{$part}[0], 'HASH', |
| 675 |
- |
|
|