2 namespace TYPO3\CMS\Scheduler\Tests\Unit\Controller;
34 $this->testObject = $this->getMock(\TYPO3\CMS\
Scheduler\Controller\SchedulerModuleController::class, array(
'dummy'), array(),
'',
false);
49 '10 September 2000' => array(
58 '+1 week 2 days 4 hours 2 seconds' => array(
59 '+1 week 2 days 4 hours 2 seconds',
61 'next Thursday' => array(
64 'last Monday' => array(
78 $expectedTimestamp = strtotime($strToTimeValue);
79 $checkDateResult = $this->testObject->checkDate($strToTimeValue);
84 $this->assertLessThan($delta, $checkDateResult - $expectedTimestamp,
'assertLessThan fails with value "' . $strToTimeValue .
'"');
85 $this->assertInternalType(\PHPUnit_Framework_Constraint_IsType::TYPE_INT, $checkDateResult,
'assertType fails with value "' . $strToTimeValue .
'"');
97 '00:00 2011-05-30' => array(
99 mktime(0, 0, 0, 5, 30, 2011)
101 '00:01 2011-05-30' => array(
103 mktime(0, 1, 0, 5, 30, 2011)
105 '23:59 2011-05-30' => array(
107 mktime(23, 59, 0, 5, 30, 2011)
109 '15:35 2000-12-24' => array(
111 mktime(15, 35, 0, 12, 24, 2000)
113 '00:01 1970-01-01' => array(
115 mktime(0, 1, 0, 1, 1, 1970)
117 '17:26 2020-03-15' => array(
119 mktime(17, 26, 0, 3, 15, 2020)
121 '1:5 2020-03-15' => array(
123 mktime(1, 5, 0, 3, 15, 2020)
125 '10:50 2020-3-5' => array(
127 mktime(10, 50, 0, 3, 5, 2020)
129 '01:01 1968-01-01' => array(
131 mktime(1, 1, 0, 1, 1, 1968)
144 $this->assertSame($expectedTimestamp, $this->testObject->checkDate($typo3DateValue),
'Fails with value "' . $typo3DateValue .
'"');
159 'HH:ii yyyy-mm-dd' => array(
175 $this->testObject->checkDate($dateValue);