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

Calendar unit tests do not run and are failing (again!)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.5, 3.2.1
    • Fix Version/s: 3.1.6, 3.2.3
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      Prerequisites
      1. A Google calendar account.
      iCalendar import
      1. Import this public calendar to your Google Calendar.
      2. Edit your Google calendar's settings and make sure that the time zone is set to "(GMT+08:00) Western Time - Perth".
      3. Login as an admin
      4. Go to Site administration > Location > Location settings
      5. Make sure "Force timezone" is set to "Users can choose their own timezone"
      6. Create a users s1.
      7. Go to the calendar and click "Manage subscriptions".
      8. Enter a value for the "Calendar name"
      9. Set the "Calendar URL" to "https://calendar.google.com/calendar/ical/moodle.com_gverd91agb5htmi8ervnn6q2j0%40group.calendar.google.com/public/basic.ics"
      10. Set the "Type of event" to "Site events" then click "Add"
      11. Import the above calendar to your Google calendar.
      12. Login as s1.
      13. Edit s1's profile and set the timezone to "Australia/Perth".
      14. View the calendar and compare the displayed events and their times with your Google Calendar.
        • Confirm that the Moodle and Google event dates and times match.
      15. Edit s1's profile and set the timezone to "Australia/Melbourne".
      16. Edit your Google Calendar's time zone setting and set it to "(GMT+11:00) Eastern Time - Melbourne/Sydney".
      17. Back on your Moodle site, view calendar and compare the displayed events and their times with your Google Calendar.
        • Confirm that the Moodle and Google event dates and times match.
      18. Edit s1's profile and set the timezone to "America/New York".
      19. Edit your Google Calendar's time zone setting and set it to "(GMT-04:00) Eastern Time".
      20. Back on your Moodle site, view calendar and compare the displayed events and their times with your Google Calendar.
        • Confirm that the Moodle and Google event dates and times match.
      Unit tests
      1. Run PHPUnit tests for the core_calendar_testsuite.

        vendor/bin/phpunit --testsuite core_calendar_testsuite
        

        Or if using MDK

        mdk phpunit -r -s core_calendar
        

        • Confirm that at least 99 unit tests are run.
        • Confirm that all tests pass.
      2. Run PHPUnit test for calendar/tests/rrulemanager_test.php.

        vendor/bin/phpunit core_calendar_rrule_manager_testcase calendar/tests/rrule_manager_test.php
        

        Or if using MDK

        mdk phpunit -r -u vendor/bin/phpunit calendar/tests/rrule_manager_test.php
        

        • Confirm that there are no errors nor failures.
      Show
      Prerequisites A Google calendar account. iCalendar import Import this public calendar to your Google Calendar. Edit your Google calendar's settings and make sure that the time zone is set to " (GMT+08:00) Western Time - Perth ". Login as an admin Go to Site administration > Location > Location settings Make sure " Force timezone " is set to " Users can choose their own timezone " Create a users s1. Go to the calendar and click " Manage subscriptions ". Enter a value for the " Calendar name " Set the " Calendar URL " to " https://calendar.google.com/calendar/ical/moodle.com_gverd91agb5htmi8ervnn6q2j0%40group.calendar.google.com/public/basic.ics " Set the " Type of event " to " Site events " then click " Add " Import the above calendar to your Google calendar. Login as s1. Edit s1's profile and set the timezone to " Australia/Perth ". View the calendar and compare the displayed events and their times with your Google Calendar. Confirm that the Moodle and Google event dates and times match. Edit s1's profile and set the timezone to " Australia/Melbourne ". Edit your Google Calendar's time zone setting and set it to " (GMT+11:00) Eastern Time - Melbourne/Sydney ". Back on your Moodle site, view calendar and compare the displayed events and their times with your Google Calendar. Confirm that the Moodle and Google event dates and times match. Edit s1's profile and set the timezone to " America/New York ". Edit your Google Calendar's time zone setting and set it to " (GMT-04:00) Eastern Time ". Back on your Moodle site, view calendar and compare the displayed events and their times with your Google Calendar. Confirm that the Moodle and Google event dates and times match. Unit tests Run PHPUnit tests for the core_calendar_testsuite. vendor/bin/phpunit --testsuite core_calendar_testsuite Or if using MDK mdk phpunit -r -s core_calendar Confirm that at least 99 unit tests are run. Confirm that all tests pass. Run PHPUnit test for calendar/tests/rrulemanager_test.php. vendor/bin/phpunit core_calendar_rrule_manager_testcase calendar/tests/rrule_manager_test.php Or if using MDK mdk phpunit -r -u vendor/bin/phpunit calendar/tests/rrule_manager_test.php Confirm that there are no errors nor failures.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-57658-master-3
    • Sprint:
      3.3 Project Team Sprint 3

      Description

      This happened before: MDL-39020 - crazy!

      calendar/tests/rrule_manager_tests.php file has the wrong name - it should be:

      calendar/tests/rrule_manager_test.php

      If you run these tests manually they will FAIL!

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/May/17