|
Lines 7-12
use DateTime::TimeZone;
Link Here
|
| 7 |
use C4::Context; |
7 |
use C4::Context; |
| 8 |
use Test::More tests => 6; |
8 |
use Test::More tests => 6; |
| 9 |
|
9 |
|
|
|
10 |
use C4::Calendar; |
| 11 |
|
| 10 |
BEGIN { use_ok('Koha::Calendar'); } |
12 |
BEGIN { use_ok('Koha::Calendar'); } |
| 11 |
|
13 |
|
| 12 |
my $dbh = C4::Context->dbh(); |
14 |
my $dbh = C4::Context->dbh(); |
|
Lines 14-19
my $dbh = C4::Context->dbh();
Link Here
|
| 14 |
$dbh->{AutoCommit} = 0; |
16 |
$dbh->{AutoCommit} = 0; |
| 15 |
$dbh->{RaiseError} = 1; |
17 |
$dbh->{RaiseError} = 1; |
| 16 |
|
18 |
|
|
|
19 |
my $sundays = { open_hour => 0, |
| 20 |
open_minute => 0, |
| 21 |
close_hour => 0, |
| 22 |
close_minute => 0, |
| 23 |
title => 'Closed on Sundays', |
| 24 |
description => 'This is an example holiday used for testing' }; |
| 25 |
|
| 26 |
# Make Sunday a closed day |
| 27 |
ModRepeatingEvent( 'MPL', 0, undef, undef, $sundays ); |
| 28 |
|
| 17 |
my $branchcode = 'MPL'; |
29 |
my $branchcode = 'MPL'; |
| 18 |
|
30 |
|
| 19 |
my $koha_calendar = Koha::Calendar->new( branchcode => $branchcode ); |
31 |
my $koha_calendar = Koha::Calendar->new( branchcode => $branchcode ); |
| 20 |
- |
|
|