mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-32547 unit tests: Make tests match file_temp_cleanup_task impl.
While default value did not change from 7 days... there are subtle differences between strtotime('-1 week') used in tests and -(7*24**3600) used in implementation. This just makes the unit test to follow the implementation by using the new config setting.
This commit is contained in:
parent
68632b6d80
commit
02badbb0e6
@ -43,7 +43,7 @@ class cronlib_testcase extends basic_testcase {
|
||||
$time = 0;
|
||||
|
||||
// Relative time stamps. Did you know data providers get executed during phpunit init?
|
||||
$lastweekstime = strtotime('-1 week') - time();
|
||||
$lastweekstime = -($CFG->tempdatafoldercleanup * 3600); // This must match file_temp_cleanup_task.
|
||||
$beforelastweekstime = $lastweekstime - 3600 - 1; // At least 1h and 1s diff (make it DST immune).
|
||||
$afterlastweekstime = $lastweekstime + 3600 + 1; // At least 1h and 1s diff (make it DST immune).
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user