Bugzilla – Attachment 89258 Details for
Bug 22834
Add a method for plugins to return the absolute path for bundled files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22834: Add tests for Koha::Plugins::Base->bundle_path
Bug-22834-Add-tests-for-KohaPluginsBase-bundlepath.patch (text/plain), 1.54 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-05-02 18:54:28 UTC
(
hide
)
Description:
Bug 22834: Add tests for Koha::Plugins::Base->bundle_path
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-05-02 18:54:28 UTC
Size:
1.54 KB
patch
obsolete
>From 903db4232d68834bc39b32e11c5ca62486c8f5f9 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 2 May 2019 15:51:17 -0300 >Subject: [PATCH] Bug 22834: Add tests for Koha::Plugins::Base->bundle_path > >--- > t/db_dependent/Plugins.t | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Plugins.t b/t/db_dependent/Plugins.t >index 7bbd8d9d78..656b9de5bd 100755 >--- a/t/db_dependent/Plugins.t >+++ b/t/db_dependent/Plugins.t >@@ -4,12 +4,14 @@ use Modern::Perl; > > use Archive::Extract; > use CGI; >+use Cwd qw(abs_path); > use File::Basename; >+use File::Spec; > use File::Temp qw( tempdir tempfile ); > use FindBin qw($Bin); > use Module::Load::Conditional qw(can_load); > use Test::MockModule; >-use Test::More tests => 42; >+use Test::More tests => 43; > > use C4::Context; > use Koha::Database; >@@ -193,3 +195,21 @@ subtest 'Test _version_compare' => sub { > is( Koha::Plugins::Base::_version_compare( '1', '1.0.0' ), 0, "1 is equal to 1.0.0" ); > is( Koha::Plugins::Base::_version_compare( '1.0', '1.0.0' ), 0, "1.0 is equal to 1.0.0" ); > }; >+ >+subtest 'bundle_path() tests' => sub { >+ >+ plan tests => 1; >+ >+ t::lib::Mocks::mock_config( 'enable_plugins', 1 ); >+ >+ my @current_dir = File::Spec->splitdir(abs_path(__FILE__)); >+ # remote Plugins.t >+ pop @current_dir; >+ # remove db_dependent >+ pop @current_dir; >+ >+ my $plugin = Koha::Plugin::Test->new; >+ >+ is( $plugin->bundle_path, File::Spec->catdir(@current_dir) . '/lib/Koha/Plugin/Test' ); >+ >+}; >-- >2.21.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22834
:
89258
|
89259
|
89260
|
89261
|
89660
|
89661
|
89809
|
89810
|
89811
|
90181
|
90182