Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

Tests for CLI tool_uploaduser.

Copyright: 2020 Marina Glancy
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 295 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: tool_uploaduser_cli_testcase  - X-Ref

Tests for CLI tool_uploaduser.

construct_helper(array $mockargv = [])   X-Ref
Generate cli_helper and mock $_SERVER['argv']

param: array $mockargv
return: \tool_uploaduser\cli_helper

test_upload_with_course_enrolment()   X-Ref
Tests simple upload with course enrolment and group allocation


test_upload_with_applying_defaults()   X-Ref
Test applying defaults during the user upload


test_upload_with_profile_fields()   X-Ref
User upload with user profile fields


test_cli_help()   X-Ref
Testing that help for CLI does not throw errors


test_create_when_user_exists()   X-Ref
Testing skipped user when one exists


test_enrolments_when_user_exists()   X-Ref
Testing update mode - do not update user records but allow enrolments


test_udpate_user()   X-Ref
Testing update mode - update user records and perform enrolments.