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

phpunit failures for 3.6 under windows

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.4.6, 3.5.3, 3.6
    • 3.4.7, 3.5.4
    • Unit tests

    Description

      Running phpunit under windows (https://pastebin.com/6T8sPjfu), I'm getting these 2 problems:

      A) 1 error, maybe related to MDL-62617

      There was 1 error:
       
      1) moodle_content_writer_test::test_export_user_preference_long_filename with data set "More than 100 characters" ('Etiam sit amet dui vel leo bl...scipit', 'Etiam sit amet dui vel leo bl...a5030d', 'value')
      ZipArchive::close(): Read error: Bad file descriptor
       
      C:\Users\stronk7\git_moodle\integration\lib\filestorage\zip_archive.php:224
      C:\Users\stronk7\git_moodle\integration\lib\filestorage\zip_packer.php:154
      C:\Users\stronk7\git_moodle\integration\privacy\classes\local\request\moodle_content_writer.php:679
      C:\Users\stronk7\git_moodle\integration\privacy\tests\moodle_content_writer_test.php:1136
      C:\Users\stronk7\git_moodle\integration\privacy\tests\moodle_content_writer_test.php:1088
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit -v "moodle_content_writer_test" privacy/tests/moodle_content_writer_test.php
      

      B) 1 failure. Apparently a simple path (backslash vs slash) thing:

      1) moodle_content_writer_test::test_export_html_functions
      Failed asserting that two arrays are equal.
      --- Expected
      +++ Actual
      @@ @@
      -    'System _.1/_files/tests/a.txt' => 'No var'
           'System _.1/Logs/Standard log/data.json' => 'data_file_6'
      +    'System _.1\_files\tests\a.txt' => 'No var'
       
      C:\Users\stronk7\git_moodle\integration\privacy\tests\moodle_content_writer_test.php:1311
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit -v "moodle_content_writer_test" privacy/tests/moodle_content_writer_test.php
      

      This is a bout to investigate both because they may mean that something is not working ok under Windows environments.

      Attachments

        Issue Links

          Activity

            People

              damyon Damyon Wiese
              stronk7 Eloy Lafuente (stronk7)
              Carlos Escobedo Carlos Escobedo
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Jan/19