Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 42... Línea 42...
42
 
42
 
43
    /**
43
    /**
44
     * Test getting the appropriate context for the userid. This should only ever
44
     * Test getting the appropriate context for the userid. This should only ever
45
     * return the user context for the user id supplied.
45
     * return the user context for the user id supplied.
46
     */
46
     */
47
    public function test_get_contexts_for_userid() {
47
    public function test_get_contexts_for_userid(): void {
Línea 48... Línea 48...
48
        $this->resetAfterTest();
48
        $this->resetAfterTest();
49
 
49
 
Línea 88... Línea 88...
88
    }
88
    }
Línea 89... Línea 89...
89
 
89
 
90
    /**
90
    /**
91
     * Test fetching users within a context.
91
     * Test fetching users within a context.
92
     */
92
     */
93
    public function test_get_users_in_context() {
93
    public function test_get_users_in_context(): void {
94
        $this->resetAfterTest();
94
        $this->resetAfterTest();
Línea 95... Línea 95...
95
        $component = 'core_course';
95
        $component = 'core_course';
96
 
96
 
Línea 136... Línea 136...
136
    }
136
    }
Línea 137... Línea 137...
137
 
137
 
138
    /**
138
    /**
139
     * Test that user data is exported.
139
     * Test that user data is exported.
140
     */
140
     */
141
    public function test_export_user_data() {
141
    public function test_export_user_data(): void {
Línea 142... Línea 142...
142
        $this->resetAfterTest();
142
        $this->resetAfterTest();
143
 
143
 
144
        $user = $this->getDataGenerator()->create_user();
144
        $user = $this->getDataGenerator()->create_user();
Línea 171... Línea 171...
171
 
171
 
172
    /**
172
    /**
173
     * Verify that if a module context is included in the contextlist_collection and its parent course is not, the
173
     * Verify that if a module context is included in the contextlist_collection and its parent course is not, the
174
     * export_context_data() call picks this up, and that the contextual course information is included.
174
     * export_context_data() call picks this up, and that the contextual course information is included.
175
     */
175
     */
176
    public function test_export_context_data_module_context_only() {
176
    public function test_export_context_data_module_context_only(): void {
Línea 177... Línea 177...
177
        $this->resetAfterTest();
177
        $this->resetAfterTest();
178
 
178
 
179
        // Create a course and a single module.
179
        // Create a course and a single module.
Línea 201... Línea 201...
201
 
201
 
202
    /**
202
    /**
203
     * Verify that if a module context and its parent course context are both included in the contextlist_collection, that course
203
     * Verify that if a module context and its parent course context are both included in the contextlist_collection, that course
204
     * contextual information is present in the export.
204
     * contextual information is present in the export.
205
     */
205
     */
206
    public function test_export_context_data_course_and_module_contexts() {
206
    public function test_export_context_data_course_and_module_contexts(): void {
Línea 207... Línea 207...
207
        $this->resetAfterTest();
207
        $this->resetAfterTest();
208
 
208
 
209
        // Create a course and a single module.
209
        // Create a course and a single module.
Línea 233... Línea 233...
233
    }
233
    }
Línea 234... Línea 234...
234
 
234
 
235
    /**
235
    /**
236
     * Test deleting all user data for one context.
236
     * Test deleting all user data for one context.
237
     */
237
     */
238
    public function test_delete_data_for_all_users_in_context() {
238
    public function test_delete_data_for_all_users_in_context(): void {
Línea 239... Línea 239...
239
        global $DB;
239
        global $DB;
Línea 240... Línea 240...
240
 
240
 
Línea 301... Línea 301...
301
    }
301
    }
Línea 302... Línea 302...
302
 
302
 
303
    /**
303
    /**
304
     * Test deleting data for only one user.
304
     * Test deleting data for only one user.
305
     */
305
     */
306
    public function test_delete_data_for_user() {
306
    public function test_delete_data_for_user(): void {
Línea 307... Línea 307...
307
        $this->resetAfterTest();
307
        $this->resetAfterTest();
308
 
308
 
309
        $user1 = $this->getDataGenerator()->create_user();
309
        $user1 = $this->getDataGenerator()->create_user();
Línea 397... Línea 397...
397
    }
397
    }
Línea 398... Línea 398...
398
 
398
 
399
    /**
399
    /**
400
     * Test deleting data within a context for an approved userlist.
400
     * Test deleting data within a context for an approved userlist.
401
     */
401
     */
402
    public function test_delete_data_for_users() {
402
    public function test_delete_data_for_users(): void {
Línea 403... Línea 403...
403
        $this->resetAfterTest();
403
        $this->resetAfterTest();
404
 
404
 
405
        $component = 'core_course';
405
        $component = 'core_course';