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

Unit test failure under windows (h5p)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.8
    • Fix Version/s: 3.8
    • Component/s: H5P, Unit tests
    • Labels:
    • Sprint:
      H5P Sprint Relase 3.8

      Description

      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

        Attachments

          Activity

            People

            Assignee:
            vmdef Víctor Déniz Falcón
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Peer reviewer:
            Carlos Escobedo
            Integrator:
            Sara Arjona (@sarjona)
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Nov/19

                Time Tracking

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