You are here

function UltimateCronRulesUnitTestCase::testRulesExtended in Ultimate Cron 7

Same name and namespace in other branches
  1. 8 tests/rules.test \UltimateCronRulesUnitTestCase::testRulesExtended()
  2. 6 tests/rules.test \UltimateCronRulesUnitTestCase::testRulesExtended()
  3. 7.2 tests/rules.test \UltimateCronRulesUnitTestCase::testRulesExtended()

File

tests/rules.test, line 279
Tests for Ultimate Cron's cron parser

Class

UltimateCronRulesUnitTestCase
@file

Code

function testRulesExtended() {
  $result = $this
    ->runTest(array(
    'result' => FALSE,
    'rules' => '0 0 * jan,oct *',
    'last_run' => '2008-01-31 00:00:00',
    'now' => '2008-03-10 09:00:00',
  ));
  $this
    ->assertTRUE($result[0], $result[1]);
  $result = $this
    ->runTest(array(
    'result' => TRUE,
    'rules' => '0 0 * jan,oct *',
    'last_run' => '2008-01-31 00:00:00',
    'now' => '2008-10-01 00:00:00',
  ));
  $this
    ->assertTRUE($result[0], $result[1]);
}