Skip to content

Commit cd3cd33

Browse files
committed
test(expr): filter(), getDues()
1 parent ee31023 commit cd3cd33

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/ExpressionTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ public function test_isDue_throws_if_modifier_invalid()
5858
Expression::isDue('* * 2L * *');
5959
}
6060

61+
public function test_filter_getDues()
62+
{
63+
$jobs = [
64+
'job1' => '*/2 */2 * * *',
65+
'job1' => '* 20,21,22 * * *',
66+
'job3' => '7-9 * */9 * *',
67+
'job4' => '*/5 * * * *',
68+
'job5' => '@5minutes',
69+
];
70+
71+
$this->assertSame(['job1', 'job4', 'job5'], Expression::getDues($jobs, '2015-08-10 21:50:00'));
72+
}
73+
6174
/**
6275
* Data provider for cron schedule.
6376
*

0 commit comments

Comments
 (0)