MDL-45654 Cron: Fix for unit test that was causing integer overflow in 32 bit php
authorDamyon Wiese <damyon@moodle.com>
Thu, 29 May 2014 04:10:19 +0000 (12:10 +0800)
committerDamyon Wiese <damyon@moodle.com>
Thu, 29 May 2014 04:10:19 +0000 (12:10 +0800)
lib/tests/cronlib_test.php

index f39953c..6696111 100644 (file)
@@ -39,7 +39,8 @@ class cronlib_testcase extends basic_testcase {
         global $CFG;
 
         $tmpdir = realpath($CFG->tempdir);
-        $time = time();
+        // This is a relative time.
+        $time = 0;
 
         // Relative time stamps. Did you know data providers get executed during phpunit init?
         $lastweekstime = -(7 * 24 * 60 * 60);