Project

General

Profile

Actions

Bug #25675

closed

Make scheduler's execution class fully testable

Added by Marcus Krause about 14 years ago. Updated almost 11 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2010-11-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

classtx_scheduler_Execution uses current timestamp as basis for execution calculations . This makes it hard to write testcases to this method. Those should ideally work with a fixed date to get simple expected results for testcases.

Solution:
Use global EXEC_TIME by default (set in constructor) and add getter/setter to modify the time.

Note:
Using global EXEC_TIME instead of several time() function calls should even have an positive perfomance impact.

(issue imported from #M16333)

Actions

Also available in: Atom PDF