You are here

function RulesUnitTest::testRulesExtended in Ultimate Cron 8.2

File

tests/src/Unit/RulesUnitTest.php, line 692

Class

RulesUnitTest
Tests Drupal\ultimate_cron\CronRule.

Namespace

Drupal\Tests\ultimate_cron\Unit

Code

function testRulesExtended() {
  $result = $this
    ->assertRule(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
    ->assertRule(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]);
}