-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.1
The test_check_configuration_default test uses message_airnotifier_manager to get a report of the state of the system, however it assumes the system is in a vanilla state.
To see why this is a problem:
- Install some plugins that provide messages:
git clone git@github.com:turnitin/moodle-mod_turnitintooltwo.git mod/turnitintooltwo
git clone git@github.com:bostelm/moodle-mod_scheduler.git mod/scheduler
git clone git@github.com:marxjohnson/moodle-block_messageteacher.git blocks/messageteacher
git clone git@github.com:catalyst/moodle-tool_trigger.git admin/tool/trigger
git clone git@github.com:moodleou/moodle-report_customsql.git report/customsql
- Run airnotifier tests:
vendor/bin/phpunit --testsuite=message_airnotifier_testsuite
In this situation it is expected to see a warning from the airnotifier manager (which is displayed at the page: SITENAME/message/output/airnotifier/checkconfiguration.php), but the test is hardcoded to expect everything is OK.
It doesn't really make sense to test this at all. As the only way to do so is to compute the number of providers configured vs the total number of providers, and then compare that to what the manager returns. And at that point you have simply copied the logic from the manager into the test.