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

(-)a/t/db_dependent/Plugins.t (-5 / +4 lines)
Lines 34-46 ok( $plugin->can('configure'), 'Test plugin can configure' ); Link Here
34
ok( $plugin->can('install'), 'Test plugin can install' );
34
ok( $plugin->can('install'), 'Test plugin can install' );
35
ok( $plugin->can('uninstall'), 'Test plugin can install' );
35
ok( $plugin->can('uninstall'), 'Test plugin can install' );
36
36
37
ok( Koha::Plugins::Handler->run({ class => "Koha::Plugin::Test", method => 'report', enable_plugins => 1 }) eq "Koha::Plugin::Test::report", 'Test run plugin report method' );
37
is( Koha::Plugins::Handler->run({ class => "Koha::Plugin::Test", method => 'report', enable_plugins => 1 }), "Koha::Plugin::Test::report", 'Test run plugin report method' );
38
38
39
my $metadata = $plugin->get_metadata();
39
my $metadata = $plugin->get_metadata();
40
ok( $metadata->{'name'} eq 'Test Plugin', 'Test $plugin->get_metadata()' );
40
is( $metadata->{'name'}, 'Test Plugin', 'Test $plugin->get_metadata()' );
41
41
42
ok( $plugin->get_qualified_table_name('mytable') eq 'koha_plugin_test_mytable', 'Test $plugin->get_qualified_table_name()' );
42
is( $plugin->get_qualified_table_name('mytable'), 'koha_plugin_test_mytable', 'Test $plugin->get_qualified_table_name()' );
43
ok( $plugin->get_plugin_http_path() eq '/plugin/Koha/Plugin/Test', 'Test $plugin->get_plugin_http_path()' );
43
is( $plugin->get_plugin_http_path(), '/plugin/Koha/Plugin/Test', 'Test $plugin->get_plugin_http_path()' );
44
44
45
my @plugins = Koha::Plugins->new({ enable_plugins => 1 })->GetPlugins( 'report' );
45
my @plugins = Koha::Plugins->new({ enable_plugins => 1 })->GetPlugins( 'report' );
46
my @names = map { $_->get_metadata()->{'name'} } @plugins;
46
my @names = map { $_->get_metadata()->{'name'} } @plugins;
47
- 

Return to bug 16502