Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.8.7
-
Component/s: Conditional activities, Unit tests
-
Testing Instructions:
-
Affected Branches:MOODLE_28_STABLE
-
Fixed Branches:MOODLE_28_STABLE, MOODLE_29_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-51077-master -
Pull Master Diff URL:
Description
In \availability_date\condition there is a function 'set_current_time_for_test' which is only for use in PHPunit.
However this sets a static value which is not cleared after the test finishes. As a result, if any future PHPunit test tries to set up something with a date restriction, it may have unexpected behaviour (i.e. the test fails when run as a group, even though it passes individually).
There are no core tests that break as a result of this, but third-party plugins might do (and we have one that does).