|
Lines 45-51
t::lib::Mocks::mock_config( 'enable_plugins', 1 );
Link Here
|
| 45 |
|
45 |
|
| 46 |
subtest 'background_tasks() hooks tests' => sub { |
46 |
subtest 'background_tasks() hooks tests' => sub { |
| 47 |
|
47 |
|
| 48 |
plan tests => 5; |
48 |
plan tests => 6; |
| 49 |
|
49 |
|
| 50 |
$schema->storage->txn_begin; |
50 |
$schema->storage->txn_begin; |
| 51 |
|
51 |
|
|
Lines 78-83
subtest 'background_tasks() hooks tests' => sub {
Link Here
|
| 78 |
$tasks = $bj->type_to_class_mapping; |
78 |
$tasks = $bj->type_to_class_mapping; |
| 79 |
$logger->warn_is("A plugin includes the 'background_tasks' method, but doesn't provide the required 'namespace' method (Koha::Plugin::Test)"); |
79 |
$logger->warn_is("A plugin includes the 'background_tasks' method, but doesn't provide the required 'namespace' method (Koha::Plugin::Test)"); |
| 80 |
|
80 |
|
|
|
81 |
t::lib::Mocks::mock_config( 'enable_plugins', 0 ); |
| 82 |
$bj = Koha::BackgroundJob->new; |
| 83 |
$tasks = $bj->type_to_class_mapping; |
| 84 |
|
| 85 |
is_deeply( $tasks, $bj->core_types_to_classes, 'Only core mapping returned when plugins disabled' ); |
| 86 |
|
| 81 |
$schema->storage->txn_rollback; |
87 |
$schema->storage->txn_rollback; |
| 82 |
Koha::Plugins::Methods->delete; |
88 |
Koha::Plugins::Methods->delete; |
| 83 |
}; |
89 |
}; |
| 84 |
- |
|
|