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

test_get_all_observers fails when multiple observers present

    XMLWordPrintable

    Details

    • Database:
      PostgreSQL
    • Testing Instructions:
      Hide

      Steps to test:
      1. install a plugin which observes '\mod_workshop\event\course_module_viewed' such as https://moodle.org/plugins/enrol_auto
      2. Run the unit test: ./vendor/bin/phpunit core_event_testcase lib/tests/event_test.php
      3. Assert that the test fails.
      4. checkout the new unit test code
      5. Run the unit test: ./vendor/bin/phpunit core_event_testcase lib/tests/event_test.php
      6. Assert that the test passes.
      7. Remove the additional add on
      8. Run the unit test: ./vendor/bin/phpunit core_event_testcase lib/tests/event_test.php
      9. Assert that the test still passes.

      Show
      Steps to test: 1. install a plugin which observes '\mod_workshop\event\course_module_viewed' such as https://moodle.org/plugins/enrol_auto 2. Run the unit test: ./vendor/bin/phpunit core_event_testcase lib/tests/event_test.php 3. Assert that the test fails. 4. checkout the new unit test code 5. Run the unit test: ./vendor/bin/phpunit core_event_testcase lib/tests/event_test.php 6. Assert that the test passes. 7. Remove the additional add on 8. Run the unit test: ./vendor/bin/phpunit core_event_testcase lib/tests/event_test.php 9. Assert that the test still passes.
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-56674-master

      Description

      If you have addition observers for the event '\mod_workshop\event\course_module_viewed' which is used in the unit test 'test_get_all_observers' (introduced in MDL-45216) , the assertion will fail.

      Steps to reproduce:
      1. install a plugin which observes '\mod_workshop\event\course_module_viewed' such as https://moodle.org/plugins/enrol_auto
      2. Run the unit test: ./vendor/bin/phpunit core_event_testcase lib/tests/event_test.php

        Attachments

          Activity

            People

            • Assignee:
              kennethhendricks Kenneth Hendricks
              Reporter:
              kennethhendricks Kenneth Hendricks
              Peer reviewer:
              Rajesh Taneja
              Integrator:
              Dan Poltawski
              Tester:
              Adrian Greeve
              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:
                Fix Release Date:
                9/Jan/17