Bugzilla – Attachment 140616 Details for
Bug 29008
Warning when checking Koha version in plugins
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29008: Add unit test
Bug-29008-Add-unit-test.patch (text/plain), 1.59 KB, created by
Fridolin Somers
on 2022-09-14 09:17:55 UTC
(
hide
)
Description:
Bug 29008: Add unit test
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2022-09-14 09:17:55 UTC
Size:
1.59 KB
patch
obsolete
>From f3a400fffeac7861e9b9b656981e48984f04f3fd Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Mon, 13 Sep 2021 23:21:55 -1000 >Subject: [PATCH] Bug 29008: Add unit test > >--- > t/db_dependent/Koha/Plugins/Plugins.t | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Plugins/Plugins.t b/t/db_dependent/Koha/Plugins/Plugins.t >index 0360a8ab87..17b018603b 100755 >--- a/t/db_dependent/Koha/Plugins/Plugins.t >+++ b/t/db_dependent/Koha/Plugins/Plugins.t >@@ -25,7 +25,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 => 61; >+use Test::More tests => 62; > use Test::Warn; > > use C4::Context; >@@ -409,4 +409,15 @@ subtest 'new() tests' => sub { > is( ref($result), 'Koha::Plugins', 'calling new with enable_plugins makes it override the config' ); > }; > >+subtest '_version_to_number() tests' => sub { >+ >+ plan tests => 5; >+ >+ is( Koha::Plugins::Base::_version_to_number(undef), 0, '_version_to_number(undef) returns 0' ); >+ is( Koha::Plugins::Base::_version_to_number('0'), 0, '_version_to_number(0) returns 0' ); >+ is( Koha::Plugins::Base::_version_to_number('18.11'), 18.11, '_version_to_number(18.11) returns 18.11' ); >+ is( Koha::Plugins::Base::_version_to_number('18.11.23'), 18.1123, '_version_to_number(18.11.23) returns 18.1123' ); >+ is( Koha::Plugins::Base::_version_to_number('18.11.23.456'), 18.1123456, '_version_to_number(18.11.23.456) returns 18.1123456' ); >+}; >+ > Koha::Plugins::Methods->delete; >-- >2.35.4
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 29008
:
124856
|
124857
|
124858
|
124859
|
140614
|
140615
| 140616