Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-57634

test_get_message_processor() fails on unconfigured plugin

    XMLWordPrintable

    Details

      Description

      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:80

      To 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).

        Attachments

          Activity

            People

            Assignee:
            maherne Michael Aherne
            Reporter:
            maherne Michael Aherne
            Peer reviewer:
            Ankit Agarwal
            Integrator:
            Andrew Nicols
            Tester:
            Andrew Nicols
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Mar/17