MDL-51077 Availability: Date restriction unit test static not cleared
authorsam marshall <s.marshall@open.ac.uk>
Tue, 11 Aug 2015 13:36:07 +0000 (14:36 +0100)
committersam marshall <s.marshall@open.ac.uk>
Fri, 14 Aug 2015 09:51:29 +0000 (10:51 +0100)
lib/phpunit/classes/util.php

index 7e89055..114a55b 100644 (file)
@@ -216,6 +216,11 @@ class phpunit_util extends testing_util {
         filter_manager::reset_caches();
         core_filetypes::reset_caches();
 
         filter_manager::reset_caches();
         core_filetypes::reset_caches();
 
+        // Reset static unit test options.
+        if (class_exists('\availability_date\condition', false)) {
+            \availability_date\condition::set_current_time_for_test(0);
+        }
+
         // Reset internal users.
         core_user::reset_internal_users();
 
         // Reset internal users.
         core_user::reset_internal_users();