|
Lines 508-515
subtest 'Backend testing (mocks)' => sub {
Link Here
|
| 508 |
# the Dummy plugin installed. load_backend & available_backends don't |
508 |
# the Dummy plugin installed. load_backend & available_backends don't |
| 509 |
# currently have tests as a result. |
509 |
# currently have tests as a result. |
| 510 |
|
510 |
|
| 511 |
my $categorycode = $builder->build({ source => 'Category' })->{categorycode}; |
511 |
my $categorycode = $builder->build({ source => 'Category' })->{categorycode}; |
| 512 |
my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; |
512 |
my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; |
| 513 |
|
513 |
|
| 514 |
my $backend = Test::MockObject->new; |
514 |
my $backend = Test::MockObject->new; |
| 515 |
$backend->set_isa('Koha::Illbackends::Mock'); |
515 |
$backend->set_isa('Koha::Illbackends::Mock'); |
|
Lines 525-531
subtest 'Backend testing (mocks)' => sub {
Link Here
|
| 525 |
$config->set_always('backend_dir', 'a_dir'); |
525 |
$config->set_always('backend_dir', 'a_dir'); |
| 526 |
|
526 |
|
| 527 |
$illrq->_backend($backend); |
527 |
$illrq->_backend($backend); |
| 528 |
$illrq->_config($config); |
528 |
$illrq->_config($config); |
| 529 |
|
529 |
|
| 530 |
isa_ok($illrq->_backend, 'Koha::Illbackends::Mock', |
530 |
isa_ok($illrq->_backend, 'Koha::Illbackends::Mock', |
| 531 |
"OK accessing mocked backend."); |
531 |
"OK accessing mocked backend."); |
|
Lines 604-610
subtest 'Backend testing (mocks)' => sub {
Link Here
|
| 604 |
} |
604 |
} |
| 605 |
)->store(); |
605 |
)->store(); |
| 606 |
|
606 |
|
| 607 |
my $part = $illrq->requested_partners(1); |
607 |
my $part = $illrq->requested_partners(1); |
| 608 |
isa_ok($part, 'ARRAY', |
608 |
isa_ok($part, 'ARRAY', |
| 609 |
"requested_partners returns array when requested"); |
609 |
"requested_partners returns array when requested"); |
| 610 |
isa_ok(@{$part}[0], 'HASH', |
610 |
isa_ok(@{$part}[0], 'HASH', |
| 611 |
- |
|
|