|
| constructorSetsNormalizedCronCommandSections () |
|
| constructorThrowsExceptionForInvalidCronCommand () |
|
| constructorSetsTimestampToNowPlusOneMinuteRoundedDownToSixtySeconds () |
|
| constructorSetsTimestampToGivenTimestampPlusSixtySeconds () |
|
| constructorSetsTimestampToGiveTimestampRoundedDownToSixtySeconds () |
|
| calculateNextValueDeterminesCorrectNextTimestamp ($cronCommand, $startTimestamp, $expectedTimestamp) |
|
| calculateNextValueDeterminesCorrectNextCalculatedTimestamp ($cronCommand, $startTimestamp, $expectedTimestamp) |
|
| calculateNextValueDeterminesCorrectNextTimestampOnConsecutiveCall ($cronCommand, $startTimestamp, $firstTimestamp, $secondTimestamp) |
|
| calculateNextValueDeterminesCorrectNextCalculatedTimestampOnConsecutiveCall ($cronCommand, $startTimestamp, $firstTimestamp, $secondTimestamp) |
|
| calculateNextValueDeterminesCorrectNextTimestampOnChangeToSummertime () |
|
| calculateNextValueThrowsExceptionWithImpossibleCronCommand () |
|
| getTimestampReturnsInteger () |
|
| getCronCommandSectionsReturnsArray () |
|
Test case
Definition at line 22 of file CronCommandTest.php.
calculateNextValueDeterminesCorrectNextCalculatedTimestamp |
( |
|
$cronCommand, |
|
|
|
$startTimestamp, |
|
|
|
$expectedTimestamp |
|
) |
| |
- Test:
- expectedCalculatedTimestampDataProvider
- Parameters
-
string | $cronCommand | Cron command |
int | $startTimestamp | Timestamp for start of calculation |
string | $expectedTimestamp | Expected result (next time of execution), to be feeded to strtotime |
Definition at line 258 of file CronCommandTest.php.
calculateNextValueDeterminesCorrectNextCalculatedTimestampOnConsecutiveCall |
( |
|
$cronCommand, |
|
|
|
$startTimestamp, |
|
|
|
$firstTimestamp, |
|
|
|
$secondTimestamp |
|
) |
| |
- Test:
- expectedCalculatedTimestampDataProvider
- Parameters
-
string | $cronCommand | Cron command |
int | $startTimestamp | [unused] Timestamp for start of calculation |
string | $firstTimestamp | Timestamp of the next execution, to be fed to strtotime |
string | $secondTimestamp | Timestamp of the further execution, to be fed to strtotime |
Definition at line 288 of file CronCommandTest.php.
calculateNextValueDeterminesCorrectNextTimestamp |
( |
|
$cronCommand, |
|
|
|
$startTimestamp, |
|
|
|
$expectedTimestamp |
|
) |
| |
- Test:
- expectedTimestampDataProvider
- Parameters
-
string | $cronCommand | Cron command |
int | $startTimestamp | Timestamp for start of calculation |
int | $expectedTimestamp | Expected result (next time of execution) |
Definition at line 244 of file CronCommandTest.php.
calculateNextValueDeterminesCorrectNextTimestampOnChangeToSummertime |
( |
| ) |
|
calculateNextValueDeterminesCorrectNextTimestampOnConsecutiveCall |
( |
|
$cronCommand, |
|
|
|
$startTimestamp, |
|
|
|
$firstTimestamp, |
|
|
|
$secondTimestamp |
|
) |
| |
- Test:
- expectedTimestampDataProvider
- Parameters
-
string | $cronCommand | Cron command |
int | $startTimestamp | [unused] Timestamp for start of calculation |
int | $firstTimestamp | Timestamp of the next execution |
int | $secondTimestamp | Timestamp of the further execution |
Definition at line 273 of file CronCommandTest.php.
calculateNextValueThrowsExceptionWithImpossibleCronCommand |
( |
| ) |
|
constructorSetsNormalizedCronCommandSections |
( |
| ) |
|
constructorSetsTimestampToGivenTimestampPlusSixtySeconds |
( |
| ) |
|
constructorSetsTimestampToGiveTimestampRoundedDownToSixtySeconds |
( |
| ) |
|
constructorSetsTimestampToNowPlusOneMinuteRoundedDownToSixtySeconds |
( |
| ) |
|
constructorThrowsExceptionForInvalidCronCommand |
( |
| ) |
|
static expectedCalculatedTimestampDataProvider |
( |
| ) |
|
|
static |
static expectedTimestampDataProvider |
( |
| ) |
|
|
static |
getCronCommandSectionsReturnsArray |
( |
| ) |
|
getTimestampReturnsInteger |
( |
| ) |
|
We're fiddling with hard timestamps in the tests, but time methods in the system under test do use timezone settings. Therefore we backup the current timezone setting, set it to UTC explicitly and reconstitute it again in tearDown()
Definition at line 40 of file CronCommandTest.php.
const TIMESTAMP = 1262304000 |
integer timestamp of 1.1.2010 0:00 (Friday), timezone UTC/GMT
Definition at line 27 of file CronCommandTest.php.