Skip to content

Commit 4d8be2b

Browse files
committed
add: test for non trivial cron expression that fails in current and passes now
1 parent bb4cb32 commit 4d8be2b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/ScheduleCheckerTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ public function test_it_can_detect_a_due_job_from_a_cron_expression()
5858
$this->assertTrue($this->scheduleChecker->isDue("* * * * *"));
5959
}
6060

61+
/**
62+
* @return void
63+
*/
64+
public function test_it_can_detect_a_due_job_from_a_non_trivial_cron_expression()
65+
{
66+
$scheduleChecker = new ScheduleChecker(new DateTimeImmutable("2017-04-01 00:00:00"));
67+
68+
$this->assertTrue($scheduleChecker->isDue("0 0 1 */3 *"));
69+
}
70+
6171
/**
6272
* @return void
6373
*/

0 commit comments

Comments
 (0)