-my $daycount = $cal->days_between( $test_dt, $later_dt );
-cmp_ok( $daycount->in_units('days'),
- '==', 48, 'days_between calculates correctly' );
-
-my $ret;
-
-$cal->set_daysmode('Calendar');
-
-# see bugzilla #8966
-is( $cal->is_holiday($later_dt), 0, 'is holiday for the next test' );
-cmp_ok( $later_dt, 'eq', '2012-09-17T17:30:00', 'Date should be the same after is_holiday' );
-
-# example tests for bug report
-$cal->clear_weekly_closed_days();
-
-$daycount = $cal->days_between( dt_from_string('2012-01-10','iso'),
- dt_from_string("2012-05-05",'iso') )->in_units('days');
-cmp_ok( $daycount, '==', 116, 'test larger intervals' );
-$daycount = $cal->days_between( dt_from_string("2012-01-01",'iso'),
- dt_from_string("2012-05-05",'iso') )->in_units('days');
-cmp_ok( $daycount, '==', 125, 'test positive intervals' );
-my $daycount2 = $cal->days_between( dt_from_string("2012-05-05",'iso'),
- dt_from_string("2012-01-01",'iso') )->in_units('days');
-cmp_ok( $daycount2, '==', $daycount, 'test parameter order not relevant' );
-$daycount = $cal->days_between( dt_from_string("2012-07-01",'iso'),
- dt_from_string("2012-07-15",'iso') )->in_units('days');
-cmp_ok( $daycount, '==', 14, 'days_between calculates correctly' );
-$cal->add_holiday( dt_from_string('2012-07-06','iso') );
-$daycount = $cal->days_between( dt_from_string("2012-07-01",'iso'),
- dt_from_string("2012-07-15",'iso') )->in_units('days');
-cmp_ok( $daycount, '==', 13, 'holiday correctly recognized' );
-
-$cal->add_holiday( dt_from_string('2012-07-07','iso') );
-$daycount = $cal->days_between( dt_from_string("2012-07-01",'iso'),
- dt_from_string("2012-07-15",'iso') )->in_units('days');
-cmp_ok( $daycount, '==', 12, 'multiple holidays correctly recognized' );
-
-my $one_day_dur = DateTime::Duration->new( days => 1 );
-my $two_day_dur = DateTime::Duration->new( days => 2 );
-my $seven_day_dur = DateTime::Duration->new( days => 7 );
-
- ## 'Datedue' tests
- $cal = Koha::Calendar->new( TEST_MODE => 1 ,
- days_mode => 'Datedue');
-
- $cal->add_holiday( dt_from_string('2012-07-04','iso') );
- $dt = dt_from_string( '2012-07-03','iso' );
+{ # Syspref-agnostic tests
+ is ( $saturday->day_of_week, 6, '\'$saturday\' is actually a saturday (6th day of week)');
+ is ( $sunday->day_of_week, 7, '\'$sunday\' is actually a sunday (7th day of week)');
+ is ( $monday->day_of_week, 1, '\'$monday\' is actually a monday (1st day of week)');
+ is ( $cal->is_holiday($saturday), 1, 'Saturday is a closed day' );
+ is ( $cal->is_holiday($sunday), 1, 'Sunday is a closed day' );
+ is ( $cal->is_holiday($monday), 0, 'Monday is not a closed day' );
+ is ( $cal->is_holiday($new_year), 1, 'Month/Day closed day test (New year\'s day)' );
+ is ( $cal->is_holiday($single_holiday), 1, 'Single holiday closed day test' );
+ is ( $cal->is_holiday($notspecial), 0, 'Fixed single date that is not a holiday test' );
+ is ( $cal->is_holiday($sunday_exception), 0, 'Exception holiday is not a closed day test' );
+ is ( $cal->is_holiday($holiday_for_another_branch), 0, 'Holiday defined for another branch should not be defined as an holiday' );
+}