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

Unittests fail on MacOS for mod_assign

XMLWordPrintable

      On MacOS the am/pm in time is lowercase and there is no way to change it.

      There are already some places in core where we find workarounds for unittests:
      https://github.com/moodle/moodle/blob/master/privacy/tests/request_transform_test.php#L68

      Test introduced in MDL-65116 fails on MacOS:

      ./vendor/bin/phpunit mod/assign/tests/locallib_test.php
      Moodle 3.8dev+ (Build: 20191030), d7699706da7f438008c2137c5fb71826d1e22c1e
      Php: 7.1.32, pgsql: 11.5, OS: Darwin 19.0.0 x86_64
      PHPUnit 7.5.17 by Sebastian Bergmann and contributors.
       
      ...............................................................  63 / 126 ( 50%)
      ..............................................................F 126 / 126 (100%)
       
       
      Time: 36.7 seconds, Memory: 84.00 MB
       
      There was 1 failure:
       
      1) mod_assign_locallib_testcase::test_view_group_override
      Failed asserting that '<div class="gradingsummary"><h3>Grading summary</h3><div class="box py-3 boxaligncenter gradingsummarytable"><table class="generaltable">\n
      <tbody><tr class="">\n
      <th class="cell c0" style="" scope="row">Hidden from students</th>\n
      <td class="cell c1 lastcol" style="">No</td>\n
      </tr>\n
      <tr class="">\n
      <th class="cell c0" style="" scope="row">Participants</th>\n
      <td class="cell c1 lastcol" style="">1</td>\n
      </tr>\n
      <tr class="">\n
      <th class="cell c0" style="" scope="row">Due date</th>\n
      <td class="cell c1 lastcol" style="">Tuesday, 28 May 2019, 7:31 am</td>\n
      </tr>\n
      <tr class="lastrow">\n
      <th class="cell c0" style="" scope="row">Time remaining</th>\n
      <td class="cell c1 lastcol" style="">Assignment is due</td>\n
      </tr>\n
      </tbody>\n
      </table>\n
      </div><center><div class="submissionlinks"><a class="btn btn-secondary" href="https://www.example.com/moodle/mod/assign/view.php?id=139000&amp;action=grading">View all submissions</a></div></div></center>' contains "Tuesday, 28 May 2019, 7:31 AM".
       
      /Users/marina/repositories/master/moodle/mod/assign/tests/locallib_test.php:4217
      /Users/marina/repositories/master/moodle/lib/phpunit/classes/advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit "mod_assign_locallib_testcase" mod/assign/tests/locallib_test.php
       
      FAILURES!
      Tests: 126, Assertions: 474, Failures: 1.
      

            marina Marina Glancy
            marina Marina Glancy
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Andrew Lyons Andrew Lyons
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 20 minutes
                2h 20m

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