-
Bug
-
Resolution: Fixed
-
Minor
-
3.2.1
-
MOODLE_32_STABLE
-
MOODLE_32_STABLE
-
- delete the /message/output/popup directory
- run vendor/bin/phpunit message/tests/api_test.php
- confirm test fails
- apply patch
- re-run test and confirm test passes
The api_test::test_get_message_processor() test fails when the first processor plugin returned by get_message_processors() is unconfigured by default.
The failure message is:
1) core_message_api_testcase::test_get_message_processor
Trying to get property of non-object/var/lib/jenkins/workspace/s-build/moodle/message/tests/api_test.php:902
/var/lib/jenkins/workspace/s-build/moodle/lib/phpunit/classes/advanced_testcase.php:80To re-run:
vendor/bin/phpunit core_message_api_testcase message/tests/api_test.php
The easiest way to replicate this is:
- delete the /message/output/popup directory
- run vendor/bin/phpunit --filter=test_get_user_notification_preferences core_message_api_testcase message/tests/api_test.php
(The replication steps work by making the jabber processor the first returned by get_message_processors(). You can confirm the test passes with missing processors by deleting the jabber one too.)
We're seeing this manifested when running unit tests with a third-party plugin whose name begins with S (they're returned in reverse alphabetical order).