+2010-11-26 Christian Kuhn <lolli@schwarzbu.ch>
+
+ * Fixed bug #16317: [scheduler] Valid values generated from cron command does not contain integers only (Thanks to Marcus Krause)
+
2010-11-25 Christian Kuhn <lolli@schwarzbu.ch>
* Fixed bug #16319: [scheduler] CronCmd class variable "values" does not contain integers only (Thanks to Marcus Krause)
$this->getList($this->cmd_sections[1], 0, 23),
$this->getDayList($this->values[3], $this->values[4]),
$this->getList($this->cmd_sections[3], 1, 12),
- $this->getList('*', date('Y', $tstamp), intval(date('Y', $tstamp))+1)
+ $this->getList('*', intval(date('Y', $tstamp)), intval(date('Y', $tstamp)) + 1)
);
}
*/
const TIMESTAMP = 1262300400;
+ /**
+ * @test
+ */
+ public function validValuesContainsIntegersForListOfMinutes() {
+ $cronCmdInstance = t3lib_div::makeInstance('tx_scheduler_cronCmd', '23 * * * *', self::TIMESTAMP);
+ $this->assertType('integer', $cronCmdInstance->valid_values[0][0]);
+ }
+
+ /**
+ * @test
+ */
+ public function validValuesContainsIntegersForListOfHours() {
+ $cronCmdInstance = t3lib_div::makeInstance('tx_scheduler_cronCmd', '* 23 * * *', self::TIMESTAMP);
+ $this->assertType('integer', $cronCmdInstance->valid_values[1][0]);
+ }
+
+ /**
+ * @test
+ */
+ public function validValuesContainsIntegersForListOfDays() {
+ $cronCmdInstance = t3lib_div::makeInstance('tx_scheduler_cronCmd', '* * 3 * *', self::TIMESTAMP);
+ $this->assertType('integer', $cronCmdInstance->valid_values[2][0]);
+ }
+
+ /**
+ * @test
+ */
+ public function validValuesContainsIntegersForListOfMonth() {
+ $cronCmdInstance = t3lib_div::makeInstance('tx_scheduler_cronCmd', '* * * 7 *', self::TIMESTAMP);
+ $this->assertType('integer', $cronCmdInstance->valid_values[3][0]);
+ }
+
+ /**
+ * @test
+ */
+ public function validValuesContainsIntegersForListOfYear() {
+ $cronCmdInstance = t3lib_div::makeInstance('tx_scheduler_cronCmd', '* * * * 2010', self::TIMESTAMP);
+ $this->assertType('integer', $cronCmdInstance->valid_values[4][0]);
+ }
+
/**
* Tests wether step values are correctly parsed for minutes
*