While integrating I noticed some problems which already existed in this
test:
* The enrolment data generator was not used
* The student roleid was hardocded
* The role assignment was at site level..
While testing the fix, it was found that ldap_stripslashes() was broken and
using a deprecated PCRE patter modifier, so it's also been fixed.
Thanks to Damyon Wiese, some units tests have been added to cover
ldap_addslashes() and ldap_stripslashes().
make_localcache_directory is the first call to make
localcache, which is already created by reset. So deleting
existing localcache directory will pass this test
This fix is mostly based on what Colin Chambers found out. This commit
is a simplification of his work.
The problem is that the Chrome / Selenium 2 integration cannot swich to
a window with a blank name. The work-around applied here is, when we
switch away from an unnamed window, we set a name on it. Then we can use
that name to switch back.
Unit tests were failing on MSSQL. gc_collect_cycles() was
removed from the phpunit utils.php file to save time in running
the tests, but MSSQL doesn't clean up open files as well as
other databases.
This patch includes the garbage collection for the unit tests
that require it.
These steps were created by sam marshall and Jes Ackland-Snow at the Open
University. I just altered them to make them a bit more generic, and
submitted them to Moodle core, at the point when I wanted to reuse them
in another plugin.
This commit introduces two new steps:
Then following "XXX" should download "YY" bytes
Then following "XXX" should download between "YY" and "ZZ" bytes
At the moment, this only works for links with href attributes.
This resolves problems when installing Moodle
and addons when preventexecpath active.
Please note the admin_setting_configfile is still
incorrectly restricted - this will be resolved by
MDL-40949.
When working against external services it can be advantageous to not
have automated tasks all hit the service at the exact same time from
many different installations.
This change allows the use of 'R' in hour/minute fields of the scheduled
task definition so a task will be installed with a 'random' hour/minute
value for these sort of occasions.
Note that the task will be installed in the database with a defined
time, this simply randomises the time chosen when loading from the
definiton.