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

config.php settings being passed through to behat acceptance site

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test 1

      1. Uninstall your behat test site
        • php admin/tool/behat/cli/util.php --drop
      2. Install your behat test site
        • php admin/tool/behat/cli/util.php --install
        • php admin/tool/behat/cli/util.php --enable
      3. Run a quick test to ensure everything works as expected
        • vendor/bin/behat --config /home/davidm/moodledata_behat/behat/behat.yml --tags @mod_survey
      4. Add the following line to your config.php

        $CFG->forcefirstname = 'Manolo';
        

      5. Open a browser tab and check your acceptance test site
      6. The last test you ran created a course and enrolled a teacher so you should see it in the front page without logging in
      7. The name of the teacher SHOULD be Teacher 1

      Test 2 (only master)

      1. Add the following line to your config.php (don't remove $CFG->forcefirstname = 'Manolo'; )

        $CFG->behat_extraallowedsettings = array('forcefirstname');
        

      2. Open a browser tab and check your acceptance test site
      3. The last test you ran created a course and enrolled a teacher so you should see it in the front page without logging in
      4. The name of the teacher SHOULD be Manolo 1
      Show
      Test 1 Uninstall your behat test site php admin/tool/behat/cli/util.php --drop Install your behat test site php admin/tool/behat/cli/util.php --install php admin/tool/behat/cli/util.php --enable Run a quick test to ensure everything works as expected vendor/bin/behat --config /home/davidm/moodledata_behat/behat/behat.yml --tags @mod_survey Add the following line to your config.php $CFG->forcefirstname = 'Manolo'; Open a browser tab and check your acceptance test site The last test you ran created a course and enrolled a teacher so you should see it in the front page without logging in The name of the teacher SHOULD be Teacher 1 Test 2 (only master) Add the following line to your config.php (don't remove $CFG->forcefirstname = 'Manolo'; ) $CFG->behat_extraallowedsettings = array('forcefirstname'); Open a browser tab and check your acceptance test site The last test you ran created a course and enrolled a teacher so you should see it in the front page without logging in The name of the teacher SHOULD be Manolo 1
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-39441_master

      Description

      In my config.php for integration, i've got the following:

      $CFG->theme = 'clean';
      

      I noticed that the behat tests were running with this theme. I suppose that you don't want this really. Note that phpunit has a whitelist of config.php values in lib/phpunit/bootstrap.php, maybe something could be shared.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dmonllao David Monllaó
              Reporter:
              poltawski Dan Poltawski
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Dan Poltawski
              Tester:
              Ankit Agarwal
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Sep/13