-
Improvement
-
Resolution: Fixed
-
Minor
-
2.9, 3.0
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
MOODLE_30_STABLE
-
phpunit_4x
-
Moodle is currently using quite an ancient and unsupported phpunit.
This means we cannot expect new features or bug fixes for the used release, which can create problems for test development.
Also, I found when testing with php7 that something weird happens in the phpunit error handler, resulting in "class not found" fatals - this doesn't happen with newer phpunit, so rather than working around it (probably a temporary php7 bug anyway), I figure we can 'just' upgrade phpunit as something more worthwhile.
MDL-47129 established that there is some deprecated assertions, in particular, calls to assertTag and assertNotTag. I have implemented one of the proposed solutions as an override function which implements the functionality Moodle needs, via some XPath queries generated in the test.