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

PHPunit does not report errors when there are missing prerequisites

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.7, 2.4.4, 2.5, 2.6
    • Fix Version/s: 2.3.8, 2.4.5, 2.5.1
    • Component/s: Unit tests
    • Labels:
    • Testing Instructions:
      Hide

      1/ execute phpunit tests with all extensions - no failure expected
      2/ uninstall php-intl extension - failure expected with basic message that tells you something is wrong with environment

      Show
      1/ execute phpunit tests with all extensions - no failure expected 2/ uninstall php-intl extension - failure expected with basic message that tells you something is wrong with environment
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w23_MDL-39465_m26_environment

      Description

      Sometimes a Moodle site is setup only for phpunit (e.g. for testing MSSQL) and some Moodle prerequisites are forgotten (e.g. "intl"). If it would not be a big performance hit, we should detect missing prerequisites and refuse to run.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            skodak Petr Skoda added a comment -

            I suppose we could just add moodle environment unit tests and run them early.

            Show
            skodak Petr Skoda added a comment - I suppose we could just add moodle environment unit tests and run them early.
            Hide
            skodak Petr Skoda added a comment -

            thanks for the report

            Show
            skodak Petr Skoda added a comment - thanks for the report
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated (23, 24, 25 & master), thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (23, 24, 25 & master), thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Uhm... just got a failure in the public integration server:

            http://integration.moodle.org/job/07.%20Run%20phpunit%20UnitTests%20(23_STABLE)/549/testReport/junit/(root)/environment_testcase/test_environment/

            And detected that you're using "part" there twice. Replacing the 2nd by "info" to show more meaningful information. Added 1 commit to all the branches, so fixed.

            Also... this... will break developers with warnings... hope it does not have a big impact. Uhm... surely I shouldn't have integrated this for 23 and 24... grrr.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Uhm... just got a failure in the public integration server: http://integration.moodle.org/job/07.%20Run%20phpunit%20UnitTests%20(23_STABLE)/549/testReport/junit/(root)/environment_testcase/test_environment/ And detected that you're using "part" there twice. Replacing the 2nd by "info" to show more meaningful information. Added 1 commit to all the branches, so fixed. Also... this... will break developers with warnings... hope it does not have a big impact. Uhm... surely I shouldn't have integrated this for 23 and 24... grrr.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Adding the dev_docs_required to annotate this new requisite somewhere in the dev docs.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Adding the dev_docs_required to annotate this new requisite somewhere in the dev docs.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Passing this, verified both with missing requisites and observed requisites.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Passing this, verified both with missing requisites and observed requisites.
            Hide
            poltawski Dan Poltawski added a comment -

            Feature: Thanks to our superb contributors
              In order to make Moodle better
              As an integrator
              I need to thank all our contributors
             
              Scenario: Dan thanks you all
                Given I log in as "dan"
                And I see "lots of fixed issues"
                When I follow "Close integrated issues"
                Then I should see "Lots of thanks to all our contributors"
            

            Your changes are upstream

            Show
            poltawski Dan Poltawski added a comment - Feature: Thanks to our superb contributors In order to make Moodle better As an integrator I need to thank all our contributors   Scenario: Dan thanks you all Given I log in as "dan" And I see "lots of fixed issues" When I follow "Close integrated issues" Then I should see "Lots of thanks to all our contributors" Your changes are upstream

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Jul/13