MDL-55548 course: update test to use waitForSecond()
[moodle.git] / course / tests / courselib_test.php
index c589648..374c508 100644 (file)
@@ -692,7 +692,7 @@ class core_course_courselib_testcase extends advanced_testcase {
         $oldtimemodified = $section->timemodified;
 
         // Update the section.
         $oldtimemodified = $section->timemodified;
 
         // Update the section.
-        sleep(1); // Ensuring that the section update occurs at a different timestamp.
+        $this->waitForSecond(); // Ensuring that the section update occurs at a different timestamp.
         course_update_section($course, $section, array());
 
         // Check that the time has changed.
         course_update_section($course, $section, array());
 
         // Check that the time has changed.