Skip to content

Commit

Permalink
Fix TicketRecurrent test on monday afternoon
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne authored and trasher committed Dec 16, 2019
1 parent d714618 commit b7f9038
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/functionnal/TicketRecurrent.php
Expand Up @@ -272,7 +272,7 @@ protected function computeNextCreationDateProvider() {
];

// Ticket created every 7 days with no anticipation and with calendar.
// We expect ticket to be created every monday at opening hour.
// We expect ticket to be created every monday at 12:00.
$data[] = [
'begin_date' => date('Y-m-d 12:00:00', strtotime('last monday')),
'end_date' => $end_of_next_year,
Expand All @@ -281,9 +281,9 @@ protected function computeNextCreationDateProvider() {
'calendars_id' => $calendar_id,
'expected_value' => $this->getNextWorkingDayDate(
$working_days,
(int)date('w') === 1
? 'tomorrow' // postpone to tomorrow if we are on monday, as today is a day off
: 'monday',
(int)date('w') === 1 && (int)date('G') <= 12
? 'tomorrow' // postpone to tomorrow if we are on monday prior to 12:00, as today is a day off
: 'next monday',
'Y-m-d 12:00:00'
),
];
Expand Down

0 comments on commit b7f9038

Please sign in to comment.