MDL-62214 tool_messageinbound: False negative due to time() usage

PHP Unit is so fast that my test couldn't cope with it!
This commit is contained in:
Frédéric Massart
2018-05-02 12:41:58 +08:00
committed by Andrew Nicols
parent ebe14385a9
commit 4352cd98bf
@@ -58,7 +58,7 @@ class tool_messageinbound_manager_testcase extends provider_testcase {
global $DB;
$now = time();
$stale = time() - DAYSECS;
$stale = $now - DAYSECS - 1; // Make a second older because PHP Unit is too damn fast!!
$this->create_messagelist(['timecreated' => $now]);
$this->create_messagelist(['timecreated' => $now - HOURSECS]);