Unit Tests for the abstract userlist Class
Copyright: | 2018 Andrew Nicols <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 262 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
userlist_base_test:: (10 methods):
test_get_userids()
get_userids_provider()
test_get_users()
test_countable()
test_user_iteration()
test_current_user_one_user()
test_current_user_invalid()
test_current_user_two_users()
test_set_component_in_constructor()
test_set_context_in_constructor()
test_userlist_base:: (1 method):
set_userids()
Class: userlist_base_test - X-Ref
Tests for the \core_privacy API's userlist base functionality.test_get_userids($input, $expected, $count) X-Ref |
Ensure that get_userids returns the list of unique userids. param: array $input List of user IDs param: array $expected list of userids param: int $count Expected count |
get_userids_provider() X-Ref |
Provider for the list of userids. return: array |
test_get_users() X-Ref |
Ensure that get_users returns the correct list of users. |
test_countable($input, $expected, $count) X-Ref |
Ensure that the userlist_base is countable. param: array $input List of user IDs param: array $expected list of userids param: int $count Expected count |
test_user_iteration() X-Ref |
Ensure that the userlist_base iterates over the set of users. |
test_current_user_one_user() X-Ref |
Test that a deleted user is still returned. If a user has data then it still must be deleted, even if they are deleted. |
test_current_user_invalid() X-Ref |
Test that an invalid user returns no entry. |
test_current_user_two_users() X-Ref |
Test that where an invalid user is listed, the next user in the list is returned instead. |
test_set_component_in_constructor() X-Ref |
Ensure that the component specified in the constructor is used and available. |
test_set_context_in_constructor() X-Ref |
Ensure that the context specified in the constructor is available. |
Class: test_userlist_base - X-Ref
A test class extending the userlist_base allowing setting of the userids.set_userids(array $userids) X-Ref |
Set the contextids for the test class. param: int[] $contexids The list of contextids to use. |