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

Whoops should not be used for Behat sites

XMLWordPrintable

    • MOODLE_404_STABLE
    • MOODLE_404_STABLE
    • MDL-80215-main
    • Hide
      1. Initialise a behat site
      2. Navigate to the site page. Do not log in
      3. Edit index.php in your preferred editor
      4. Just before the line redirect_if_major_upgrade_required (around line 35 add:

        throw new \coding_exception('Oops');
        

      5. Refresh your browser
        1. Confirm you get the Whoops error page showing you the full trace and a code snippet
      6. Grab the behat_wwwroot from your config.php
      7. Navigate to your Behat wwwroot
        1. Confirm that you saw an old school error page and not the Whoops one
      Show
      Initialise a behat site Navigate to the site page. Do not log in Edit index.php in your preferred editor Just before the line redirect_if_major_upgrade_required (around line 35 add: throw new \coding_exception('Oops'); Refresh your browser Confirm you get the Whoops error page showing you the full trace and a code snippet Grab the behat_wwwroot from your config.php Navigate to your Behat wwwroot Confirm that you saw an old school error page and not the Whoops one

      The intention with Whoops was to not be active on a Behat site.
      Unfortunately we have several constants which can get quite confusing. The one we are using is BEHAT_TEST, which actually indicates that the Behat CLI tooling is in use. The one we want is BEHAT_SITE_RUNNING which indiciates that the site is a Behat site.

        1. (1) 5 Passed -- (Main)MDL-80215.png
          136 kB
          Kim Jared Lucas
        2. (1) 7 Passed -- (Main)MDL-80215.png
          47 kB
          Kim Jared Lucas

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Paul Holden Paul Holden
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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