View | Details | Raw Unified | Return to bug 21073
Collapse All | Expand All

(-)a/t/db_dependent/ImportBatch.t (-1 / +4 lines)
Lines 188-194 subtest "RecordsFromMarcPlugin" => sub { Link Here
188
188
189
    t::lib::Mocks::mock_config( 'enable_plugins', 1 );
189
    t::lib::Mocks::mock_config( 'enable_plugins', 1 );
190
    t::lib::Mocks::mock_preference( 'UseKohaPlugins', 1 );
190
    t::lib::Mocks::mock_preference( 'UseKohaPlugins', 1 );
191
    my ($plugin) = Koha::Plugins->new->GetPlugins({ all => 1, metadata => { name => 'MarcFieldValues' } });
191
192
    my $plugins = Koha::Plugins->new;
193
    $plugins->InstallPlugins;
194
    my ($plugin) = $plugins->GetPlugins({ all => 1, metadata => { name => 'MarcFieldValues' } });
192
    isnt( $plugin, undef, "Plugin found" );
195
    isnt( $plugin, undef, "Plugin found" );
193
    my $records = C4::ImportBatch::RecordsFromMarcPlugin( $name, ref $plugin, 'UTF-8' );
196
    my $records = C4::ImportBatch::RecordsFromMarcPlugin( $name, ref $plugin, 'UTF-8' );
194
    is( @$records, 2, 'Two results returned' );
197
    is( @$records, 2, 'Two results returned' );
(-)a/t/db_dependent/Koha/REST/Plugin/PluginRoutes.t (-2 / +8 lines)
Lines 50-56 subtest 'Bad plugins tests' => sub { Link Here
50
    t::lib::Mocks::mock_config( 'enable_plugins', 1 );
50
    t::lib::Mocks::mock_config( 'enable_plugins', 1 );
51
    t::lib::Mocks::mock_preference( 'UseKohaPlugins', 1 );
51
    t::lib::Mocks::mock_preference( 'UseKohaPlugins', 1 );
52
52
53
    my @plugins = Koha::Plugins->new->GetPlugins( { all => 1 } );
53
    my $plugins = Koha::Plugins->new;
54
    $plugins->InstallPlugins;
55
56
    my @plugins = $plugins->GetPlugins( { all => 1 } );
54
    foreach my $plugin (@plugins) {
57
    foreach my $plugin (@plugins) {
55
        $plugin->enable;
58
        $plugin->enable;
56
    }
59
    }
Lines 81-87 subtest 'Disabled plugins tests' => sub { Link Here
81
84
82
    my $good_plugin;
85
    my $good_plugin;
83
86
84
    my @plugins = Koha::Plugins->new->GetPlugins( { all => 1 } );
87
    my $plugins = Koha::Plugins->new;
88
    $plugins->InstallPlugins;
89
90
    my @plugins = $plugins->GetPlugins( { all => 1 } );
85
    foreach my $plugin (@plugins) {
91
    foreach my $plugin (@plugins) {
86
        $plugin->disable;
92
        $plugin->disable;
87
        $good_plugin = $plugin
93
        $good_plugin = $plugin
(-)a/t/db_dependent/Koha/Template/Plugin/KohaPlugins.t (-2 / +3 lines)
Lines 31-37 my $schema = Koha::Database->new->schema; Link Here
31
$schema->storage->txn_begin;
31
$schema->storage->txn_begin;
32
32
33
# Enable all plugins
33
# Enable all plugins
34
my @plugins = Koha::Plugins->new->GetPlugins({ all => 1, class => 'Koha::Plugin::Test' });
34
my $plugins = Koha::Plugins->new;
35
$plugins->InstallPlugins;
36
my @plugins = $plugins->GetPlugins({ all => 1, class => 'Koha::Plugin::Test' });
35
map { $_->enable; } @plugins;
37
map { $_->enable; } @plugins;
36
38
37
my $mock_plugin = Test::MockModule->new( 'Koha::Plugin::Test' );
39
my $mock_plugin = Test::MockModule->new( 'Koha::Plugin::Test' );
38
- 

Return to bug 21073