Skip to content

Commit

Permalink
test(expr): filter(), getDues()
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Aug 16, 2018
1 parent ee31023 commit cd3cd33
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/ExpressionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@ public function test_isDue_throws_if_modifier_invalid()
Expression::isDue('* * 2L * *');
}

public function test_filter_getDues()
{
$jobs = [
'job1' => '*/2 */2 * * *',
'job1' => '* 20,21,22 * * *',
'job3' => '7-9 * */9 * *',
'job4' => '*/5 * * * *',
'job5' => '@5minutes',
];

$this->assertSame(['job1', 'job4', 'job5'], Expression::getDues($jobs, '2015-08-10 21:50:00'));
}

/**
* Data provider for cron schedule.
*
Expand Down

0 comments on commit cd3cd33

Please sign in to comment.