From 6c75bec493307983b3ce1c2ce1ea8350afdd1552 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 27 Jun 2018 17:13:37 +0000 Subject: [PATCH] Bug 20968: Add unit tests Signed-off-by: Stephen Graham Signed-off-by: Kyle M Hall --- t/db_dependent/Plugins.t | 4 +++- t/lib/Koha/Plugin/Test.pm | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Plugins.t b/t/db_dependent/Plugins.t index 68e19fafe1..09b59d411c 100755 --- a/t/db_dependent/Plugins.t +++ b/t/db_dependent/Plugins.t @@ -9,7 +9,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; @@ -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' ); diff --git a/t/lib/Koha/Plugin/Test.pm b/t/lib/Koha/Plugin/Test.pm index 7bf51df1df..ca78c78875 100644 --- a/t/lib/Koha/Plugin/Test.pm +++ b/t/lib/Koha/Plugin/Test.pm @@ -45,6 +45,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"; -- 2.17.1 (Apple Git-112)