From 4352cd98bfa33e36e65fbed4b5248dedbb529bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Massart?= Date: Wed, 2 May 2018 12:41:58 +0800 Subject: [PATCH] MDL-62214 tool_messageinbound: False negative due to time() usage PHP Unit is so fast that my test couldn't cope with it! --- admin/tool/messageinbound/tests/manager_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/tool/messageinbound/tests/manager_test.php b/admin/tool/messageinbound/tests/manager_test.php index 936d99636a0..b88a74261bf 100644 --- a/admin/tool/messageinbound/tests/manager_test.php +++ b/admin/tool/messageinbound/tests/manager_test.php @@ -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]);