Moodle
  1. Moodle
  2. MDL-31710

webservice unit tests: add function scopes

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

      0) Requires admin access & having both the code-checker and the phpdoc-checker local plugins installed.

      1) Run the code-checker against 'webservice/simpletest/testwebservice.php'.
      2) TEST: No errors are returned, only a few warnings about some comments potentially being code (with some %).

      3) Run the phpdoc-checker against 'webservice/simpletest/testwebservice.php'.
      4) No error/warnings are returned.

      Show
      0) Requires admin access & having both the code-checker and the phpdoc-checker local plugins installed. 1) Run the code-checker against 'webservice/simpletest/testwebservice.php'. 2) TEST: No errors are returned, only a few warnings about some comments potentially being code (with some %). 3) Run the phpdoc-checker against 'webservice/simpletest/testwebservice.php'. 4) No error/warnings are returned.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      All functions of the web service unit test class miss their scope (public, protected, private). Add them (mainly public): /webservice/simpletest/testwebservice.php

        Gliffy Diagrams

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          Hi Jerome, I'm getting onto this.

          Show
          Eloy Lafuente (stronk7) added a comment - Hi Jerome, I'm getting onto this.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sending to integration:

          • fixes some missing (public|private) scope in methods.
          • fixes whitespace.
          • fixes inline comments.
          • fixes other codechecker warnings/errors.

          All them aiming to have the file ready for some changes in order to enable those test as much as possible.

          NOTE to INTEGRATORS: This branch is built on top of MDL-30994 (to avoid conflicts), so must be integrated AFTER it.

          Show
          Eloy Lafuente (stronk7) added a comment - Sending to integration: fixes some missing (public|private) scope in methods. fixes whitespace. fixes inline comments. fixes other codechecker warnings/errors. All them aiming to have the file ready for some changes in order to enable those test as much as possible. NOTE to INTEGRATORS: This branch is built on top of MDL-30994 (to avoid conflicts), so must be integrated AFTER it.
          Hide
          Jérôme Mouneyrac added a comment -

          Thanks Eloy, it's very nice. Which codechecker are you using? Tim's or Marina's?

          Show
          Jérôme Mouneyrac added a comment - Thanks Eloy, it's very nice. Which codechecker are you using? Tim's or Marina's?
          Hide
          Eloy Lafuente (stronk7) added a comment -

          both

          Show
          Eloy Lafuente (stronk7) added a comment - both
          Hide
          Jérôme Mouneyrac added a comment -

          Thanks for the reminder, I'll go through them before pushing now.

          Show
          Jérôme Mouneyrac added a comment - Thanks for the reminder, I'll go through them before pushing now.
          Hide
          Sam Hemelryk added a comment -

          Thanks Eloy - all looked spot on!

          Show
          Sam Hemelryk added a comment - Thanks Eloy - all looked spot on!
          Hide
          Adrian Greeve added a comment -

          Success. Tests for both the code-checker and the phpdoc-checker returned what was expected.
          Thanks.

          Show
          Adrian Greeve added a comment - Success. Tests for both the code-checker and the phpdoc-checker returned what was expected. Thanks.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Your changes are now upstream and will be included in the next minor released scheduled for March 13th (next Monday!).

          icao_reverse('arreis olik rebemevon afla letoh ognat');
          

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Your changes are now upstream and will be included in the next minor released scheduled for March 13th (next Monday!). icao_reverse('arreis olik rebemevon afla letoh ognat'); Closing, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: