You are here

function RulesUnitTest::testIntervalsSpecificMinute in Ultimate Cron 8.2

File

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

Class

RulesUnitTest
Tests Drupal\ultimate_cron\CronRule.

Namespace

Drupal\Tests\ultimate_cron\Unit

Code

function testIntervalsSpecificMinute() {
  $intervals = $this
    ->getIntervals('0 12 * * *');
  $this
    ->assertEquals(array(
    0,
  ), $intervals['minutes'], 'Expected minutes to be 0');
  $intervals = $this
    ->getIntervals('10 12 * * *');
  $this
    ->assertEquals(array(
    10,
  ), $intervals['minutes'], 'Expected minutes to be 10');
  $intervals = $this
    ->getIntervals('59 12 * * *');
  $this
    ->assertEquals(array(
    59,
  ), $intervals['minutes'], 'Expected minutes to be 59');
}