forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-81698 phpunit: Convert some skipped tests into useful ones
After some tests, it seems that we can safely cover phpunit_util::reset_all_data() executing it within own basic_test self tests. That way we can confirm that the reset code is doing its job and detecting unexpected changes at various levels (database, globals, ...). Note that, in order to catch the E_USER_WARNINGS, for PHPUnit 9.6 and up, we have to convert them to exceptions, because the notice/ warning/error expectations have been deprecated and will be removed in PHPUnit 10. So we are using a trick, already used also by advanced_test. And, no matter that we are repeating the trick a few times, that's ok in order to have all its uses controlled.
- Loading branch information
Showing
1 changed file
with
125 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters