Lines 1-20
Link Here
|
1 |
#!/usr/bin/env perl |
1 |
#!/usr/bin/perl |
|
|
2 |
|
3 |
# This file is part of Koha. |
4 |
# |
5 |
# Koha is free software; you can redistribute it and/or modify it |
6 |
# under the terms of the GNU General Public License as published by |
7 |
# the Free Software Foundation; either version 3 of the License, or |
8 |
# (at your option) any later version. |
9 |
# |
10 |
# Koha is distributed in the hope that it will be useful, but |
11 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
# GNU General Public License for more details. |
14 |
# |
15 |
# You should have received a copy of the GNU General Public License |
16 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
2 |
|
17 |
|
3 |
use Modern::Perl; |
18 |
use Modern::Perl; |
|
|
19 |
|
20 |
use Test::More; |
21 |
use Test::MockModule; |
22 |
|
4 |
use DateTime; |
23 |
use DateTime; |
5 |
use DateTime::Duration; |
24 |
use DateTime::Duration; |
6 |
use Test::More tests => 35; |
|
|
7 |
use Test::MockModule; |
8 |
use Koha::Cache; |
25 |
use Koha::Cache; |
9 |
use Koha::DateUtils; |
26 |
use Koha::DateUtils; |
10 |
|
27 |
|
11 |
BEGIN { |
28 |
use Module::Load::Conditional qw/check_install/; |
12 |
use_ok('Koha::Calendar'); |
|
|
13 |
|
29 |
|
14 |
# This was the only test C4 had |
30 |
BEGIN { |
15 |
# Remove when no longer used |
31 |
if ( check_install( module => 'Test::DBIx::Class' ) ) { |
16 |
#use_ok('C4::Calendar'); # not used anymore? |
32 |
plan tests => 35; |
|
|
33 |
} else { |
34 |
plan skip_all => "Need Test::DBIx::Class" |
35 |
} |
17 |
} |
36 |
} |
|
|
37 |
|
38 |
use_ok('Koha::Calendar'); |
39 |
|
18 |
use Test::DBIx::Class { |
40 |
use Test::DBIx::Class { |
19 |
schema_class => 'Koha::Schema', |
41 |
schema_class => 'Koha::Schema', |
20 |
connect_info => ['dbi:SQLite:dbname=:memory:','',''], |
42 |
connect_info => ['dbi:SQLite:dbname=:memory:','',''], |
Lines 298-300
my $day_after_christmas = DateTime->new(
Link Here
|
298 |
'==', 40, 'Test parameter order not relevant (Days)' ); |
320 |
'==', 40, 'Test parameter order not relevant (Days)' ); |
299 |
|
321 |
|
300 |
} |
322 |
} |
|
|
323 |
|
324 |
1; |