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

Test re-loading original data, discarding cleanups already performed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.8, 3.6.6, 3.7, 3.8, 3.9
    • Fix Version/s: 3.5.10, 3.6.8, 3.7.4
    • Component/s: Unit tests
    • Labels:

      Description

      First of all, this is not critical at all and, in fact, it has been working ok till now.

      But, recently, I started to play with travis to get unit tests running there for Windows and this issue is 100% breaking the execution.

      Link to code: https://github.com/moodle/moodle/blob/master/lib/tests/messageinbound_test.php#L112-L115

      Basically, we are loading a file, that can have \n or \r\n, depending of the git checkout options... and we correctly normalize the file always, replacing all CRLFs by LFs.

      But, then, instead of using that normalized $content, we load the file again, ultimately heading to a complete phpunit error, because it's in a provider executed early in the phpunit process.

      So this is about to ensure that we use the normalized $content and done. With that, those windows executions having git configured to get CRLFs... will continue working ok. I quick tried here and passed from:

      To:

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stronk7 Eloy Lafuente (stronk7)
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Peer reviewer:
                Tim Hunt
                Integrator:
                Adrian Greeve
                Tester:
                CiBoT
                Participants:
                Component watchers:
                Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Jan/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 50 minutes
                  1h 50m