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

Add void return type to standard unit tests

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.4.2
    • 4.4, 4.5
    • Unit tests
    • MOODLE_404_STABLE, MOODLE_405_STABLE
    • MOODLE_404_STABLE
    • MDL-81522_404
    • Hide

      Regression testing.

      1. Verify that all the PHPUnit executions in the issue (GHA, CI, ...) are passing ok.

      Completeness testing.

      1. Install moodle-cs following the instructions.
      2. Run the following command:

        path/to/phpcs --standard=moodle \
            --sniffs=moodle.PHPUnit.TestReturnType \
            -s -p /path/to/your/moodle
        

      3. Wait the execution to finish (you should see some progress with dots...). Can be some good minutes (~10 minutes here) to examine all the code.
      4. Verify that there isn't any problem reported (the output, after the dots, only reports the execution time and the memory used). The end of the output has to look similar to this:

        ...
        ...
        ............................................................ 18360 / 18427 (100%)
        ............................................................ 18420 / 18427 (100%)
        .......                                                      18427 / 18427 (100%)
         
         
        Time: 10 mins, 3.36 secs; Memory: 318.01MB
        

      Show
      Regression testing. Verify that all the PHPUnit executions in the issue (GHA, CI, ...) are passing ok. Completeness testing. Install moodle-cs following the instructions . Run the following command: path/to/phpcs --standard=moodle \ --sniffs=moodle.PHPUnit.TestReturnType \ -s -p /path/to/your/moodle Wait the execution to finish (you should see some progress with dots...). Can be some good minutes (~10 minutes here) to examine all the code. Verify that there isn't any problem reported (the output, after the dots, only reports the execution time and the memory used). The end of the output has to look similar to this: ... ... ............................................................ 18360 / 18427 (100%) ............................................................ 18420 / 18427 (100%) ....... 18427 / 18427 (100%)     Time: 10 mins, 3.36 secs; Memory: 318.01MB

      This isn't required for PHPUnit 10, but I feel that it's something we should probably do as it prevents test weirdness.

            stronk7 Eloy Lafuente (stronk7)
            dobedobedoh Andrew Lyons
            Andrew Lyons Andrew Lyons
            Simey Lameze Simey Lameze
            Raquel Ortega Raquel Ortega
            Votes:
            0 Vote for this issue
            Watchers:
            3 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, 1 hour, 37 minutes
                1d 1h 37m

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