Skip to content

Commit 38c8854

Browse files
committed
Added @Assert tags to test phpunit-skelgen. Worked.
1 parent e092a11 commit 38c8854

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

main/inc/lib/usermanager.lib.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ private function __construct () {
3636
/**
3737
* Creates a new user for the platform
3838
* @author Hugues Peeters <[email protected]>,
39-
* Roan Embrechts <[email protected]>
40-
*
39+
* @author Roan Embrechts <[email protected]>
4140
* @param string Firstname
4241
* @param string Lastname
4342
* @param int Status (1 for course tutor, 5 for student, 6 for anonymous)
@@ -55,10 +54,9 @@ private function __construct () {
5554
* @param array Extra fields
5655
* @param string Encrypt method used if password is given encrypted. Set to an empty string by default
5756
* @return mixed new user id - if the new user creation succeeds, false otherwise
58-
*
59-
* @desc The function tries to retrieve $_user['user_id'] from the global space.
60-
* if it exists, $_user['user_id'] is the creator id. If a problem arises,
61-
* it stores the error message in global $api_failureList
57+
* @desc The function tries to retrieve $_user['user_id'] from the global space. If it exists, $_user['user_id'] is the creator id. If a problem arises, it stores the error message in global $api_failureList
58+
* @assert ('Sam','Gamegie',5,'[email protected]','jo','jo') > 1
59+
* @assert ('Pippin','Took',null,null,'jo','jo') === false
6260
*/
6361
public static function create_user($firstName, $lastName, $status, $email, $loginName, $password, $official_code = '', $language = '', $phone = '', $picture_uri = '', $auth_source = PLATFORM_AUTH_SOURCE, $expiration_date = '0000-00-00 00:00:00', $active = 1, $hr_dept_id = 0, $extra = null, $encrypt_method = '', $send_mail = false) {
6462
global $_user, $_configuration;
@@ -3709,4 +3707,4 @@ static function remove_user_admin($user_id) {
37093707
Database::query($sql);
37103708
}
37113709
}
3712-
}
3710+
}

0 commit comments

Comments
 (0)