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

Fix testcase issues found in MDL-27577

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Deferred
    • Affects Version/s: 1.9.12, 2.0.3
    • Fix Version/s: 1.9.13, 2.0.4
    • Component/s: Libraries
    • Labels:
    • Environment:
      Mac and servers with different timezone then "Australia/Perth"
    • Testing Instructions:
      Hide

      1. Login as admin
      2. Update timezone (Site administration -> location -> update timezone)
      3. Run testmoodlelib.php simpletest.

      Instructions to run testmoodlelib.php simpletest
      On Moodle 2.xx
      1. Navigate to unit test (Development -> unit test)
      2. enter "lib/simpletest/testmoodlelib.php" in textbox.
      3. click "Run test"

      On Moodle 1.9x
      1. Navigate to unit test (Reports -> unit test)
      2. enter "lib/simpletest/testmoodlelib.php" in textbox.
      3. click "Run test"

      Show
      1. Login as admin 2. Update timezone (Site administration -> location -> update timezone) 3. Run testmoodlelib.php simpletest. Instructions to run testmoodlelib.php simpletest On Moodle 2.xx 1. Navigate to unit test (Development -> unit test) 2. enter "lib/simpletest/testmoodlelib.php" in textbox. 3. click "Run test" On Moodle 1.9x 1. Navigate to unit test (Reports -> unit test) 2. enter "lib/simpletest/testmoodlelib.php" in textbox. 3. click "Run test"
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Pull Master Branch:
      wip-mdl-27863-master

      Description

      Eloy found out few issues in testcase for MDL-27577.

      Issue 1:
      I'm passing the test because it seems that the offset is properly calculated always... but I'm getting this errors in my Mac:
      Expected: Friday, 1 July 2011, 10:00 AM => Actual: Friday, 1 July 2011, 10:00 am
      So really tests aren't passing here, because my local return the AM/PM information lowercased.

      Issue 2:
      Some of the tests are only going to work in sites being Perth/Australia @ OS, because test results are dependent of that.
      To be able to reproduce that, just add this line:
      date_default_timezone_set('Europe/Madrid');
      in the very fist lines of test_userdate() and you will get the offending ones.
      I think they are the ones calculating based on server time. I get 4 errors here.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    1/Aug/11