function UltimateCronRulesUnitTestCase::testIntervals2MinuteRangeWithOffset in Ultimate Cron 7
Same name and namespace in other branches
- 6 tests/rules.test \UltimateCronRulesUnitTestCase::testIntervals2MinuteRangeWithOffset()
- 7.2 tests/rules.test \UltimateCronRulesUnitTestCase::testIntervals2MinuteRangeWithOffset()
File
- tests/rules.test, line 69
- Tests for Ultimate Cron's cron parser
Class
- UltimateCronRulesUnitTestCase
- @file
Code
function testIntervals2MinuteRangeWithOffset() {
$intervals = $this
->getIntervals('0-1+1 12 * * *');
$this
->assertEqual($intervals['minutes'], range(2, 1, -1), 'Expected minutes to be 1, 2');
$intervals = $this
->getIntervals('10-11+1 12 * * *');
$this
->assertEqual($intervals['minutes'], range(12, 11, -1), 'Expected minutes to be 11, 12');
$intervals = $this
->getIntervals('42-43+1 12 * * *');
$this
->assertEqual($intervals['minutes'], array(
44,
43,
), 'Expected minutes to be 43, 44');
$intervals = $this
->getIntervals('58-59+1 12 * * *');
$this
->assertEqual($intervals['minutes'], array(
59,
0,
), 'Expected minutes to be 59, 0');
}