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

WS servers cleaning process should auto cast object into array

    XMLWordPrintable

    Details

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

      phpunit externallib_testcase lib/tests/externallib_test.php

      Also manually:
      1- Edit any external functions to return an object. I personally used user/externallib.php:create_users(). i edited it to return user objects with id/username instead of arrays with id/username.
      2- run the PHP-SOAP client (https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-SOAP). You can test with REST too but you'll need to cheery-pick MDL-37358.

      You should see the resulting XML code with the new user id/username.

      Show
      phpunit externallib_testcase lib/tests/externallib_test.php Also manually: 1- Edit any external functions to return an object. I personally used user/externallib.php:create_users(). i edited it to return user objects with id/username instead of arrays with id/username. 2- run the PHP-SOAP client ( https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-SOAP ). You can test with REST too but you'll need to cheery-pick MDL-37358 . You should see the resulting XML code with the new user id/username.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-37355-master

      Description

      WS servers cleaning process should auto cast object into array.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/13