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

H5P helper test_get_export_info method fails when run in isolation

XMLWordPrintable

      $ vendor/bin/phpunit h5p/tests/helper_test.php --filter test_get_export_info
      Moodle 4.2dev+ (Build: 20230406)
      Php: 8.0.28, mysqli: 8.0.32, OS: Linux 5.4.0-146-generic x86_64
      PHPUnit 9.5.27 by Sebastian Bergmann and contributors.
       
      E                                                                   1 / 1 (100%)
       
      Time: 00:00.015, Memory: 58.50 MB
       
      There was 1 error:
       
      1) core_h5p\helper_test::test_get_export_info
      Error: Interface "Moodle\H5PFileStorage" not found
       
      /mnt/export/moodle/master/src/h5p/classes/file_storage.php:41
      /mnt/export/moodle/master/src/lib/classes/component.php:144
      /mnt/export/moodle/master/src/h5p/tests/helper_test.php:346
      /mnt/export/moodle/master/src/lib/phpunit/classes/advanced_testcase.php:80
       
      ERRORS!
      Tests: 1, Assertions: 0, Errors: 1.
      

      It needs to call the autoloader register() method to ensure required classes/interfaces are available

            pholden Paul Holden
            pholden Paul Holden
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ilya Tregubov Ilya Tregubov
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 40 minutes
                40m

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