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

Incorrect (for php70) return :void detected in behat stuff

    XMLWordPrintable

Details

    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • Hide

      Requirements

      1. web server and CLI using PHP 7.0.x (behat will tell you if both are ok or there are any differences)

      Preparation

      1. Copy the attached 67009.feature file into the lib/tests/behat/ directory.
      2. Init behat (with the flag: -a)
      3. Run behat with flags: --tags '@mdl67009'
      4. Verify that you get 3 failures (one for each suite/theme: default, clean, more).
      5. Edit config.php and add: $CFG->behat_pause_on_fail = true;
      6. Run behat again, with same flags: --tags '@mdl67009'
      7. Verify that you get the execution paused 3 times (press <<enter>> after every one) with message:

        Scenario failed. Paused for inspection. Press Enter/Return to continue.
        Exception follows:
        Link matching locator "Participants" not found.
        

      8. Verify that after the 3rd <<enter>> the execution ends and the 3 failures are reported exactly like they where in points 3 & 4, more exactly:
        1. a list, 001, 002, 003 of failures and then, at the end
        2. the standard execution summary with failed scenarios, steps, time...
      Show
      Requirements web server and CLI using PHP 7.0.x (behat will tell you if both are ok or there are any differences) Preparation Copy the attached 67009.feature file into the lib/tests/behat/ directory. Init behat (with the flag: -a ) Run behat with flags: --tags '@mdl67009' Verify that you get 3 failures (one for each suite/theme: default, clean, more). Edit config.php and add: $CFG->behat_pause_on_fail = true; Run behat again, with same flags: --tags '@mdl67009' Verify that you get the execution paused 3 times (press <<enter>> after every one) with message: Scenario failed. Paused for inspection. Press Enter/Return to continue. Exception follows: Link matching locator "Participants" not found. Verify that after the 3rd <<enter>> the execution ends and the 3 failures are reported exactly like they where in points 3 & 4, more exactly: a list, 001, 002, 003 of failures and then, at the end the standard execution summary with failed scenarios, steps, time...

    Description

      It seems that in MDL-66675 we missed a return :void that doesn't work under php70 (they were introduced in php71). dobedobedoh spotted it while working on MDL-66945.

      So this issue is about getting rid of that unsupported void return hinting. Just that. 35 and 36 (37 already requires php71).

      Ciao

      Attachments

        Issue Links

          Activity

            People

              stronk7 Eloy Lafuente (stronk7)
              stronk7 Eloy Lafuente (stronk7)
              Simey Lameze Simey Lameze
              Jake Dallimore Jake Dallimore
              CiBoT CiBoT
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Nov/19

                Time Tracking

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