Lines 25-31
use File::Temp qw( tempdir tempfile );
Link Here
|
25 |
use FindBin qw($Bin); |
25 |
use FindBin qw($Bin); |
26 |
use Module::Load::Conditional qw(can_load); |
26 |
use Module::Load::Conditional qw(can_load); |
27 |
use Test::MockModule; |
27 |
use Test::MockModule; |
28 |
use Test::More tests => 55; |
28 |
use Test::More tests => 56; |
29 |
|
29 |
|
30 |
use C4::Context; |
30 |
use C4::Context; |
31 |
use Koha::Database; |
31 |
use Koha::Database; |
Lines 358-361
subtest 'new() tests' => sub {
Link Here
|
358 |
is( ref($result), 'Koha::Plugins', 'calling new with enable_plugins makes it override the config' ); |
358 |
is( ref($result), 'Koha::Plugins', 'calling new with enable_plugins makes it override the config' ); |
359 |
}; |
359 |
}; |
360 |
|
360 |
|
|
|
361 |
subtest '_version_to_number() tests' => sub { |
362 |
|
363 |
plan tests => 5; |
364 |
|
365 |
is( Koha::Plugins::Base::_version_to_number(undef), 0, '_version_to_number(undef) returns 0' ); |
366 |
is( Koha::Plugins::Base::_version_to_number('0'), 0, '_version_to_number(0) returns 0' ); |
367 |
is( Koha::Plugins::Base::_version_to_number('18.11'), 18.11, '_version_to_number(18.11) returns 18.11' ); |
368 |
is( Koha::Plugins::Base::_version_to_number('18.11.23'), 18.1123, '_version_to_number(18.11.23) returns 18.1123' ); |
369 |
is( Koha::Plugins::Base::_version_to_number('18.11.23.456'), 18.1123456, '_version_to_number(18.11.23.456) returns 18.1123456' ); |
370 |
}; |
371 |
|
361 |
Koha::Plugins::Methods->delete; |
372 |
Koha::Plugins::Methods->delete; |
362 |
- |
|
|