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

PHP 8.0: Strange sorting failure in quizaccess_seb_property_list_testcase

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.9.7, 3.10.4
    • 3.10.1
    • Quiz

      There is the following failure on PHP8

      It looks like a different sort order or capital/lowercase letters. dmitriim, would be great if you can look at it.

      12) quizaccess_seb_property_list_testcase::test_export_to_json with data set "unordered elements" ('<key>testKey</key><string>tes...tring>', '{"allowWlan":"testValue3","al...alue"}')
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'{"allowWlan":"testValue3","allowWLAN":"testValue2","testKey":"testValue"}'
      +'{"allowWLAN":"testValue2","allowWlan":"testValue3","testKey":"testValue"}'
       
      /var/www/html/mod/quiz/accessrule/seb/tests/property_list_test.php:240
      /var/www/html/lib/phpunit/classes/advanced_testcase.php:80
      
      

      I have a quick fix for it in my test branch but I don't really understand what happened in PHP 8 and why did it change

            pholden Paul Holden
            marina Marina Glancy
            Andrew Lyons Andrew Lyons
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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