Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dda862a
)
MDL-51077 Availability: Date restriction unit test static not cleared
author
sam marshall
<s.marshall@open.ac.uk>
Tue, 11 Aug 2015 13:36:07 +0000
(14:36 +0100)
committer
sam marshall
<s.marshall@open.ac.uk>
Fri, 14 Aug 2015 09:51:29 +0000
(10:51 +0100)
lib/phpunit/classes/util.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/phpunit/classes/util.php
b/lib/phpunit/classes/util.php
index
7e89055
..
114a55b
100644
(file)
--- a/
lib/phpunit/classes/util.php
+++ b/
lib/phpunit/classes/util.php
@@
-216,6
+216,11
@@
class phpunit_util extends testing_util {
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();