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

Unit test failure under windows (h5p)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.8
    • 3.8
    • H5P, Unit tests
    • H5P Sprint Relase 3.8

      Just finished a Windows phpunit execution and got this:

      1)

      core_h5p\local\tests\h5p_file_storage_testcase::test_getUpgradeScript
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'\libraries/TestLib-3.1/upgrade.js'
      +'/libraries/TestLib-3.1/upgrade.js'
       
      C:\Users\stronk7\git_moodle\integration\h5p\tests\h5p_file_storage_test.php:466
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit "core_h5p\local\tests\h5p_file_storage_testcase" h5p/tests/h5p_file_storage_test.php
      

      Ideally we should not be using backslashes ever but forward ones to avoid this type of problems, so it's always better to fix in in core (unless it's test-only problem).

      2)

      core_h5p\local\tests\h5p_file_storage_testcase::test_saveFileFromZip
      file_put_contents(C:\Users\stronk7\moodledata\integration_phpunit/localcache\af5313be-0e95-49d1-b9c8-413dfe422d12\105cdd60-d75a-4e35-a38b-640b6d9d0d34/h5p-5dc36c5c7f47f/): failed to open stream: No such file or directory
       
      C:\Users\stronk7\git_moodle\integration\h5p\classes\file_storage.php:425
      C:\Users\stronk7\git_moodle\integration\h5p\tests\h5p_file_storage_test.php:495
      C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit -v "core_h5p\local\tests\h5p_file_storage_testcase" h5p/tests/h5p_file_storage_test.php
      

      Ciao

            vmdef Victor Déniz Falcón
            stronk7 Eloy Lafuente (stronk7)
            Carlos Escobedo Carlos Escobedo
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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