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 => 61; |
28 |
use Test::More tests => 62; |
29 |
use Test::Warn; |
29 |
use Test::Warn; |
30 |
|
30 |
|
31 |
use C4::Context; |
31 |
use C4::Context; |
Lines 409-412
subtest 'new() tests' => sub {
Link Here
|
409 |
is( ref($result), 'Koha::Plugins', 'calling new with enable_plugins makes it override the config' ); |
409 |
is( ref($result), 'Koha::Plugins', 'calling new with enable_plugins makes it override the config' ); |
410 |
}; |
410 |
}; |
411 |
|
411 |
|
|
|
412 |
subtest '_version_to_number() tests' => sub { |
413 |
|
414 |
plan tests => 5; |
415 |
|
416 |
is( Koha::Plugins::Base::_version_to_number(undef), 0, '_version_to_number(undef) returns 0' ); |
417 |
is( Koha::Plugins::Base::_version_to_number('0'), 0, '_version_to_number(0) returns 0' ); |
418 |
is( Koha::Plugins::Base::_version_to_number('18.11'), 18.11, '_version_to_number(18.11) returns 18.11' ); |
419 |
is( Koha::Plugins::Base::_version_to_number('18.11.23'), 18.1123, '_version_to_number(18.11.23) returns 18.1123' ); |
420 |
is( Koha::Plugins::Base::_version_to_number('18.11.23.456'), 18.1123456, '_version_to_number(18.11.23.456) returns 18.1123456' ); |
421 |
}; |
422 |
|
412 |
Koha::Plugins::Methods->delete; |
423 |
Koha::Plugins::Methods->delete; |
413 |
- |
|
|