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

When running all simple tests from the command line the admin/generator.php script is called and run

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1, 2.2
    • Fix Version/s: 2.1.2
    • Component/s: Unit tests
    • Labels:
    • Testing Instructions:
      Hide

      Run each of these scripts through the unit tests report page and make sure each completes successfully with and without the admin/generator.php script included.

      I have done this and it makes no difference, I therefore conclude that the include is not needed and I can remove it without harm.

      Show
      Run each of these scripts through the unit tests report page and make sure each completes successfully with and without the admin/generator.php script included. I have done this and it makes no difference, I therefore conclude that the include is not needed and I can remove it without harm.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull Master Branch:

      Description

      I have a little script that runs all of the simple tests in moodle from the command line.

      There is an issue in a few of the simple tests where admin/generator.php is included (but not used). When admin/generator.php is included and the simple test is run from the command line the admin/generator.php script takes control and asks the user for input, then die()'s because it wasn't passed any params or args.

      I have fixed this by removing the include of admin/generator.php from the following simple tests

      lib/simpletest/portfolio_testclass.php
      lib/simpletest/testrepositorylib.php
      mod/assignment/simpletest/test_assignment_portfolio_callers.php
      mod/chat/simpletest/test_chat_portfolio_callers.php
      mod/data/simpletest/test_data_portfolio_callers.php
      mod/forum/simpletest/test_forum_portfolio_callers.php
      mod/glossary/simpletest/test_glossary_portfolio_callers.php
      portfolio/boxnet/simpletest/testportfoliopluginboxnet.php

      To test that this fix hasn't broken anything I removed the include from the simple tests and made sure that the same number of tests where run and all of tests still passed.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Oct/11