-
Improvement
-
Resolution: Fixed
-
Minor
-
3.9, 3.10, 4.0
-
MOODLE_310_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MOODLE_310_STABLE
-
Right now we are running phpunit 7.5.x (MDL-65204). It's time to bump to newer version.
Candidates are, right now: (source link):
- 8.x: supports php 7.2, 7.3 and 7.4 (that aligns 100% with our supported PHP versions). Huge changes required. Fully supported till Feb 2021.
- 9.x: still not released. Not enough info right now. Maybe to be considered next year.
Because of a better alignment with Moodle 3.9 PHP supported versions (see ongoing work @ MDL-66260) this issue is about to upgrade to phpunit 8.5. Knowing that changes aren't trivial.
SUMMARY:
- Upgrade composer to the target phpunit version (link to procedure).
- Fullfill phpunit API required changes.
- Fix other incompatibilities detected.
- Add a note @ upgrade.txt, pointing to the docs (and maybe main points).
- Verify that the new code is passing against ALL php supported versions.
- Verify that behat continues passing without problem
- Verify that incomplete and skipped tests are shown using the -v[erbose] switch.
- Send the issue to peer-review, yay!
Some notes to reviewer(s).
- It's recommended to review the patch commit by commit. I've tried to introduce all the important information within each commit message.
- Don't become crazy about checking the hundreds of changes to assertions 1 by 1. PHPUnit execution will tell you if there is any change missing (will emit warning or failure). Better focus on commits with logic.
- Verify that there are commits corresponding to all the "DONE" points in the comment used to trace the progress.
TODO (after rolled upstream):
- Create a new section like this @ the development Moodle Docs, explaining the main differences and linking to complete information.
- Also fill this table with the new version just added.
- has a clone
-
MDL-71036 Upgrade PHPUnit to 9.5.x
- Closed
- has a non-specific relationship to
-
CONTRIB-8264 Warn about deprecated @expectedExceptionXXX phpunit annotations
- Closed
-
MDL-66260 Prepare Moodle for PHP 7.4
- Closed
-
MDL-69882 Final deprecation of phpunit/dbunit methods in advanced_testcase
- Closed
- is a clone of
-
MDL-65204 Upgrade phpunit to 7.5.x
- Closed
- Testing discovered
-
MDL-69885 Check non _test.php files containing PHPUnit assertions
- Open
-
MDL-69624 Running "question_engine_test" alone fails
- Closed
-
MDL-69688 Verify test_context_not_used unit test and fix it
- Closed
-
MDL-69700 Verify test_invalid_related / test_create_competency_with_nasty_data tests
- Closed
- will help resolve
-
MDL-64600 Prepare for removal of PHPUnit/DbUnit
- Closed