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.

Class: core_userliblib_testcase  - X-Ref

Unit tests for user lib api.

test_user_get_user_details_courses()   X-Ref
Test user_get_user_details_courses


test_user_get_user_details_courses_groupmode_nogroups()   X-Ref
Verify return when course groupmode set to 'no groups'.


test_user_get_user_details_courses_groupmode_separate()   X-Ref
Verify return when course groupmode set to 'separate groups'.


test_user_get_user_details_courses_groupmode_visible()   X-Ref
Verify return when course groupmode set to 'visible groups'.


test_user_update_user()   X-Ref
Test user_update_user.


test_create_users()   X-Ref
Test create_users.


test_create_user_invalid_username($username, $expectmessage)   X-Ref
Test that {@link user_create_user()} throws exception when invalid username is provided.

param: string $username Invalid username
param: string $expectmessage Expected exception message

data_create_user_invalid_username()   X-Ref
Data provider for {@link self::test_create_user_invalid_username()}.

return: array

test_user_count_login_failures()   X-Ref
Test function user_count_login_failures().


test_user_add_password_history()   X-Ref
Test function user_add_password_history().


test_user_is_previously_used_password()   X-Ref
Test function user_add_password_history().


test_delete_of_hashes_on_user_delete()   X-Ref
Test that password history is deleted together with user.


test_user_list_view()   X-Ref
Test user_list_view function


test_user_menu_custom_avatar_size()   X-Ref
Test setting the user menu avatar size.


test_user_can_view_profile()   X-Ref
Test user_can_view_profile


test_user_get_user_details()   X-Ref
Test user_get_user_details


test_user_get_user_details_missing_fields()   X-Ref
Regression test for MDL-57840.

Ensure the fields "auth, confirmed, idnumber, lang, theme, timezone and mailformat" are present when
calling user_get_user_details() function.