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

Fix testcase issues found in MDL-27577

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Deferred
    • Icon: Major Major
    • 1.9.13, 2.0.4
    • 1.9.12, 2.0.3
    • Libraries
    • Mac and servers with different timezone then "Australia/Perth"
    • MOODLE_19_STABLE, MOODLE_20_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE
    • wip-mdl-27863-master
    • 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"

      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.

            rajeshtaneja Rajesh Taneja
            rajeshtaneja Rajesh Taneja
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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