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

H5P PHPUnit test fixes

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.8
    • 3.8
    • H5P
    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • MDL-67158-master
    • Hide

      Setup

      1. In terminal run "php admin/tool/phpunit/cli/init.php" from the pathroot of your Moodlesite installation.

      Testing scenario 1. LONGTEST skipped

      1. In terminal run "./vendor/bin/phpunit h5p/tests/framework_test.php"
        • Make sure 3 tests are being skipped (test_fetchExternalData_no_path_defined, test_fetchExternalData_path_defined, test_fetchExternalData_url_not_h5p)
          because PHPUNIT_LONGTEST is not defined

      Testing scenario 2. All tests executed

      1. In config.php add:

      define('PHPUNIT_LONGTEST', true);

      # In the terminal run "./vendor/bin/phpunit h5p/tests/framework_test.php"

        • Make sure all test are being successfully executed.
      1. In the terminal run "./vendor/bin/phpunit h5p/tests/generator_test.php"
        • Make sure all test are being successfully executed.
      2. In the terminal run "./vendor/bin/phpunit h5p/tests/h5p_file_storage_test.php"
        • Make sure all test are being successfully executed.
      Show
      Setup In terminal run "php admin/tool/phpunit/cli/init.php" from the pathroot of your Moodlesite installation. Testing scenario 1. LONGTEST skipped In terminal run " ./vendor/bin/phpunit h5p/tests/framework_test.php" Make sure 3 tests are being skipped (test_fetchExternalData_no_path_defined, test_fetchExternalData_path_defined, test_fetchExternalData_url_not_h5p) because PHPUNIT_LONGTEST is not defined Testing scenario 2. All tests executed In config.php add: define( 'PHPUNIT_LONGTEST' , true ); # In the terminal run " ./vendor/bin/phpunit h5p/tests/framework_test.php" Make sure all test are being successfully executed. In the terminal run " ./vendor/bin/phpunit h5p/tests/generator_test.php" Make sure all test are being successfully executed. In the terminal run " ./vendor/bin/phpunit h5p/tests/h5p_file_storage_test.php" Make sure all test are being successfully executed.
    • H5P Sprint Relase 3.8

      Some things which I've come across and which need fixing.

      PHPUNIT_LONGTEST required in framework tests which call download_file_content:

      1. test_fetchExternalData_no_path_defined and friends

      runTestsInSeparateProcess required for all tests which include the H5P libraries.
      This is because they will load libraries which can conflict with a known third-party library and will either cause that plugin's tests to fail, or will fail because of that plugin at some point in the future.

            Geshoski Mihail Geshoski
            dobedobedoh Andrew Lyons
            Carlos Escobedo Carlos Escobedo
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Gladys Basiana Gladys Basiana
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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