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

PHP Unit does not consistently require global $CFG

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 2.6.2
    • Fix Version/s: None
    • Component/s: Unit tests
    • Labels:
    • Affected Branches:
      MOODLE_26_STABLE

      Description

      If you run PHP Unit passing the file name, the file should start with global $CFG. If you pass the testcase, it does not need it.

      vendor/bin/phpunit lib/tests/portfoliolib_test.php
      vs.
      vendor/bin/phpunit core_portfoliolib_testcase
      

      This creates inconsistencies between our development environment and the CI server. See comments in MDL-45256.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              fred Frédéric Massart
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, 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: