Bug 20968: Add unit tests
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 27 Jun 2018 17:13:37 +0000 (17:13 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 29 Nov 2018 10:11:35 +0000 (11:11 +0100)
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 60ca17c616e6026fbd271fb3f99473f3ef7edf00)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit db0c642d9b5c051b16a535882cea181f425860d2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

t/db_dependent/Plugins.t
t/lib/Koha/Plugin/Test.pm

index c2d4c9d..c95966e 100755 (executable)
@@ -10,7 +10,7 @@ use File::Temp qw( tempdir tempfile );
 use FindBin qw($Bin);
 use Module::Load::Conditional qw(can_load);
 use Test::MockModule;
-use Test::More tests => 39;
+use Test::More tests => 41;
 
 use C4::Context;
 use t::lib::Mocks;
@@ -42,6 +42,8 @@ isa_ok( $plugin, "Koha::Plugins::Base", 'Test plugin parent class' );
 ok( $plugin->can('report'), 'Test plugin can report' );
 ok( $plugin->can('tool'), 'Test plugin can tool' );
 ok( $plugin->can('to_marc'), 'Test plugin can to_marc' );
+ok( $plugin->can('intranet_catalog_biblio_enhancements'), 'Test plugin can intranet_catalog_biblio_enhancements');
+ok( $plugin->can('get_intranet_catalog_toolbar_button'), 'Test plugin can get_intranet_catalog_toolbar_button' );
 ok( $plugin->can('opac_online_payment'), 'Test plugin can opac_online_payment' );
 ok( $plugin->can('opac_online_payment_begin'), 'Test plugin can opac_online_payment_begin' );
 ok( $plugin->can('opac_online_payment_end'), 'Test plugin can opac_online_payment_end' );
index 419cc08..31f9dde 100644 (file)
@@ -43,6 +43,16 @@ sub to_marc {
     return "Koha::Plugin::Test::to_marc";
 }
 
+sub get_intranet_catalog_toolbar_button {
+    my ( $self, $args ) = @_;
+    return "Koha::Plugin::Test::get_intranet_catalog_toolbar_button";
+}
+
+sub intranet_catalog_biblio_enhancements {
+    my ( $self, $args ) = @_;
+    return "Koha::Plugin::Test::intranet_catalog_biblio_enhancements";
+}
+
 sub opac_online_payment {
     my ( $self, $args ) = @_;
     return "Koha::Plugin::Test::opac_online_payment";