Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 46... Línea 46...
46
    }
46
    }
Línea 47... Línea 47...
47
 
47
 
48
    /**
48
    /**
49
     * Tests simple upload with course enrolment and group allocation
49
     * Tests simple upload with course enrolment and group allocation
50
     */
50
     */
51
    public function test_upload_with_course_enrolment() {
51
    public function test_upload_with_course_enrolment(): void {
52
        global $CFG;
52
        global $CFG;
53
        $this->resetAfterTest();
53
        $this->resetAfterTest();
54
        set_config('passwordpolicy', 0);
54
        set_config('passwordpolicy', 0);
Línea 83... Línea 83...
83
    }
83
    }
Línea 84... Línea 84...
84
 
84
 
85
    /**
85
    /**
86
     * Test applying defaults during the user upload
86
     * Test applying defaults during the user upload
87
     */
87
     */
88
    public function test_upload_with_applying_defaults() {
88
    public function test_upload_with_applying_defaults(): void {
89
        global $CFG;
89
        global $CFG;
90
        $this->resetAfterTest();
90
        $this->resetAfterTest();
91
        set_config('passwordpolicy', 0);
91
        set_config('passwordpolicy', 0);
Línea 115... Línea 115...
115
    }
115
    }
Línea 116... Línea 116...
116
 
116
 
117
    /**
117
    /**
118
     * User upload with user profile fields
118
     * User upload with user profile fields
119
     */
119
     */
120
    public function test_upload_with_profile_fields() {
120
    public function test_upload_with_profile_fields(): void {
121
        global $CFG;
121
        global $CFG;
122
        $this->resetAfterTest();
122
        $this->resetAfterTest();
123
        set_config('passwordpolicy', 0);
123
        set_config('passwordpolicy', 0);
Línea 148... Línea 148...
148
    }
148
    }
Línea 149... Línea 149...
149
 
149
 
150
    /**
150
    /**
151
     * Testing that help for CLI does not throw errors
151
     * Testing that help for CLI does not throw errors
152
     */
152
     */
153
    public function test_cli_help() {
153
    public function test_cli_help(): void {
154
        $this->resetAfterTest();
154
        $this->resetAfterTest();
155
        $this->setAdminUser();
155
        $this->setAdminUser();
156
        $clihelper = $this->construct_helper(["--help"]);
156
        $clihelper = $this->construct_helper(["--help"]);
157
        ob_start();
157
        ob_start();
Línea 166... Línea 166...
166
    }
166
    }
Línea 167... Línea 167...
167
 
167
 
168
    /**
168
    /**
169
     * Testing skipped user when one exists
169
     * Testing skipped user when one exists
170
     */
170
     */
171
    public function test_create_when_user_exists() {
171
    public function test_create_when_user_exists(): void {
172
        global $CFG;
172
        global $CFG;
173
        $this->resetAfterTest();
173
        $this->resetAfterTest();
174
        set_config('passwordpolicy', 0);
174
        set_config('passwordpolicy', 0);
Línea 201... Línea 201...
201
    }
201
    }
Línea 202... Línea 202...
202
 
202
 
203
    /**
203
    /**
204
     * Testing update mode - do not update user records but allow enrolments
204
     * Testing update mode - do not update user records but allow enrolments
205
     */
205
     */
206
    public function test_enrolments_when_user_exists() {
206
    public function test_enrolments_when_user_exists(): void {
207
        global $CFG;
207
        global $CFG;
Línea 208... Línea 208...
208
        require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/uploaduser/locallib.php');
208
        require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/uploaduser/locallib.php');
209
 
209
 
Línea 243... Línea 243...
243
    }
243
    }
Línea 244... Línea 244...
244
 
244
 
245
    /**
245
    /**
246
     * Testing update mode - update user records and perform enrolments.
246
     * Testing update mode - update user records and perform enrolments.
247
     */
247
     */
248
    public function test_udpate_user() {
248
    public function test_udpate_user(): void {
249
        global $CFG;
249
        global $CFG;
Línea 250... Línea 250...
250
        require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/uploaduser/locallib.php');
250
        require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/uploaduser/locallib.php');
251
 
251