Index: typo3/sysext/scheduler/tests/tx_scheduler_croncmdTest.php =================================================================== --- typo3/sysext/scheduler/tests/tx_scheduler_croncmdTest.php (revision 9658) +++ typo3/sysext/scheduler/tests/tx_scheduler_croncmdTest.php (working copy) @@ -238,5 +238,26 @@ $actualResult = $cronCmdInstance->valid_values; $this->assertEquals($expectedResult, $actualResult[2]); } + + + /** + * Tests correct calculation of next value for day of week command at change of a year + * + * @test + */ + public function nextValueCorrectDayAtChangeOfYearWithSingleDayOfWeek() { + $testTimestamp = 1293526800; // integer timestamp 28.12.2010 10:00 (Tuesday) + $cronCmdInstance = t3lib_div::makeInstance('tx_scheduler_cronCmd', '31 2 * * 1', $testTimestamp); + $cronCmdInstance->calculateNextValue(0); + $expectedResult = array( + '0' => 31, + '1' => 2, + '2' => 3, + '3' => 1, + '4' => 2011, + ); + $actualResult = $cronCmdInstance->values; + $this->assertEquals($expectedResult, $actualResult); + } } -?> \ No newline at end of file +?>