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

    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • 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

    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

              maherne Michael Aherne
              maherne Michael Aherne
              Mark Nelson Mark Nelson
              Andrew Lyons Andrew Lyons
              Rajesh Taneja Rajesh Taneja
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                13/Mar/17