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

core hooks defined in behat_hooks must be defined first

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MDL-75559-master
    • Hide
      1. Initialise Behat as normal
      2. Apply the attached patch:

        git am 75559.patch
        

      3. Run a single behat scenario. e.g:

         php admin/tool/behat/cli/run.php --name="Add forum activities and discussions"
        

        1. Tail your web server's error log. e.g. if your Apache error log is in /opt/homebrew/var/log/httpd:

          tail -f /var/log/apache2/error.log

          Check your phpinfo() to see where your PHP error log is being output.

        2. Confirm that the output includes these in the following order:

          Looking in /Users/nicols/Sites/moodles/sm/moodle/lib/tests/behat/behat_hooks.php at a value of: false
          Setting 'foo' to 'bar' in /Users/nicols/Sites/moodles/sm/moodle/course/tests/behat/behat_course.php
          Looking in /Users/nicols/Sites/moodles/sm/moodle/mod/bigbluebuttonbn/tests/behat/behat_mod_bigbluebuttonbn.php at a value of: 'bar'
          

      Prior to this patch the value was set before the behat_hooks call then reset the site data, so it was not available in mod_bbb

      Show
      Initialise Behat as normal Apply the attached patch: git am 75559.patch Run a single behat scenario. e.g: php admin/tool/behat/cli/run.php --name="Add forum activities and discussions" Tail your web server's error log. e.g. if your Apache error log is in /opt/homebrew/var/log/httpd: tail -f /var/log/apache2/error.log Check your phpinfo() to see where your PHP error log is being output. Confirm that the output includes these in the following order : Looking in /Users/nicols/Sites/moodles/sm/moodle/lib/tests/behat/behat_hooks.php at a value of: false Setting 'foo' to 'bar' in /Users/nicols/Sites/moodles/sm/moodle/course/tests/behat/behat_course.php Looking in /Users/nicols/Sites/moodles/sm/moodle/mod/bigbluebuttonbn/tests/behat/behat_mod_bigbluebuttonbn.php at a value of: 'bar' Prior to this patch the value was set before the behat_hooks call then reset the site data, so it was not available in mod_bbb

      While working on MDL-75282 we noticed behat context sorting was not right in get_components_contexts() causing some behat failures.

      Core hooks defined in behat_hooks class must be defined first as they include the root of all tests, hooks, and more.

        1. 75559.patch
          2 kB
          Andrew Lyons
        2. MDL-75559_v39.png
          85 kB
          Angelia Dela Cruz
        3. MDL-75559_v400.png
          50 kB
          Angelia Dela Cruz
        4. MDL-75559_master.png
          92 kB
          Angelia Dela Cruz
        5. MDL-75559_v311.png
          85 kB
          Angelia Dela Cruz

            dobedobedoh Andrew Lyons
            lameze Simey Lameze
            Simey Lameze Simey Lameze
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 32 minutes
                1d 2h 32m

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