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

test_get_user_notification_preferences() unit test fails with third-party message providers

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. install the attached plugin and initialise phpunit
      2. Run vendor/bin/phpunit --filter=test_get_user_notification_preferences core_message_externallib_testcase message/tests/externallib_test.php
      3. Confirm that unit test passes
      Show
      install the attached plugin and initialise phpunit Run vendor/bin/phpunit --filter=test_get_user_notification_preferences core_message_externallib_testcase message/tests/externallib_test.php Confirm that unit test passes
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:

      Description

      There is a new unit test in 3.2 - core_message_externallib_testcase::test_get_user_notification_preferences() - that makes assertions on the number of components providing notifications to a user. This fails when there is a third-party plugin installed that has a message provider that is accessible to users by default.

      To replicate:

      1. install the attached plugin and initialise phpunit
      2. Run vendor/bin/phpunit --filter=test_get_user_notification_preferences core_message_externallib_testcase message/tests/externallib_test.php
      3. You should see a failure with the message "Failed asserting that actual size 9 matches expected size 8."

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              maherne Michael Aherne
              Reporter:
              maherne Michael Aherne
              Peer reviewer:
              Mark Nelson
              Integrator:
              Andrew Nicols
              Tester:
              Rajesh Taneja
              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:
              4 Start watching this issue

                Dates

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