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

PHPUnit test fail when a site has custom notification provider

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.2, 3.2.1
    • Fix Version/s: None
    • Component/s: Unit tests
    • Labels:
    • Affected Branches:
      MOODLE_32_STABLE

      Description

      Since version 3.2 there is a new test_get_user_notification_preferences in source message/tests/externallib_test.php.
      It seems to check if there is exactly 8 notifications providers. I suppose those providers come with Moodle application.
      We developed and added a custom notification provider to our Moodle application.
      So when the test is running, it find 9 providers instead of 8 and test fails.

      It is possible to change the way test is done?
      One solution would be to check there is at least 8 providers.
      Other solution would be to check using the provider's names that all providers that come with Moodle are there.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sergeg55 Serge Gauthier
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: