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

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

XMLWordPrintable

    • 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

      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."

            maherne Michael Aherne
            maherne Michael Aherne
            Mark Nelson Mark Nelson
            Andrew Lyons Andrew Lyons
            Rajesh Taneja Rajesh Taneja
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.