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

phpunit failures for 3.6 under windows

XMLWordPrintable

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

      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.

            damyon Damyon Wiese
            stronk7 Eloy Lafuente (stronk7)
            Carlos Escobedo Carlos Escobedo
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 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.