Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 48... Línea 48...
48
    use \core_question_privacy_helper;
48
    use \core_question_privacy_helper;
Línea 49... Línea 49...
49
 
49
 
50
    /**
50
    /**
51
     * Test that a user who has no data gets no contexts
51
     * Test that a user who has no data gets no contexts
52
     */
52
     */
53
    public function test_get_contexts_for_userid_no_data() {
53
    public function test_get_contexts_for_userid_no_data(): void {
54
        global $USER;
54
        global $USER;
55
        $this->resetAfterTest();
55
        $this->resetAfterTest();
Línea 56... Línea 56...
56
        $this->setAdminUser();
56
        $this->setAdminUser();
Línea 60... Línea 60...
60
    }
60
    }
Línea 61... Línea 61...
61
 
61
 
62
    /**
62
    /**
63
     * Test for provider::get_contexts_for_userid() when there is no quiz attempt at all.
63
     * Test for provider::get_contexts_for_userid() when there is no quiz attempt at all.
64
     */
64
     */
65
    public function test_get_contexts_for_userid_no_attempt_with_override() {
65
    public function test_get_contexts_for_userid_no_attempt_with_override(): void {
66
        global $DB;
66
        global $DB;
Línea 67... Línea 67...
67
        $this->resetAfterTest(true);
67
        $this->resetAfterTest(true);
68
 
68
 
Línea 90... Línea 90...
90
    }
90
    }
Línea 91... Línea 91...
91
 
91
 
92
    /**
92
    /**
93
     * The export function should handle an empty contextlist properly.
93
     * The export function should handle an empty contextlist properly.
94
     */
94
     */
95
    public function test_export_user_data_no_data() {
95
    public function test_export_user_data_no_data(): void {
96
        global $USER;
96
        global $USER;
97
        $this->resetAfterTest();
97
        $this->resetAfterTest();
Línea 98... Línea 98...
98
        $this->setAdminUser();
98
        $this->setAdminUser();
Línea 112... Línea 112...
112
    }
112
    }
Línea 113... Línea 113...
113
 
113
 
114
    /**
114
    /**
115
     * The delete function should handle an empty contextlist properly.
115
     * The delete function should handle an empty contextlist properly.
116
     */
116
     */
117
    public function test_delete_data_for_user_no_data() {
117
    public function test_delete_data_for_user_no_data(): void {
118
        global $USER;
118
        global $USER;
119
        $this->resetAfterTest();
119
        $this->resetAfterTest();
Línea 120... Línea 120...
120
        $this->setAdminUser();
120
        $this->setAdminUser();
Línea 130... Línea 130...
130
    }
130
    }
Línea 131... Línea 131...
131
 
131
 
132
    /**
132
    /**
133
     * Export + Delete quiz data for a user who has made a single attempt.
133
     * Export + Delete quiz data for a user who has made a single attempt.
134
     */
134
     */
135
    public function test_user_with_data() {
135
    public function test_user_with_data(): void {
136
        global $DB;
136
        global $DB;
Línea 137... Línea 137...
137
        $this->resetAfterTest(true);
137
        $this->resetAfterTest(true);
138
 
138
 
Línea 219... Línea 219...
219
    }
219
    }
Línea 220... Línea 220...
220
 
220
 
221
    /**
221
    /**
222
     * Export + Delete quiz data for a user who has made a single attempt.
222
     * Export + Delete quiz data for a user who has made a single attempt.
223
     */
223
     */
224
    public function test_user_with_preview() {
224
    public function test_user_with_preview(): void {
225
        global $DB;
225
        global $DB;
Línea 226... Línea 226...
226
        $this->resetAfterTest(true);
226
        $this->resetAfterTest(true);
227
 
227
 
Línea 282... Línea 282...
282
    }
282
    }
Línea 283... Línea 283...
283
 
283
 
284
    /**
284
    /**
285
     * Export + Delete quiz data for a user who has made a single attempt.
285
     * Export + Delete quiz data for a user who has made a single attempt.
286
     */
286
     */
287
    public function test_delete_data_for_all_users_in_context() {
287
    public function test_delete_data_for_all_users_in_context(): void {
288
        global $DB;
288
        global $DB;
Línea 289... Línea 289...
289
        $this->resetAfterTest(true);
289
        $this->resetAfterTest(true);
290
 
290
 
Línea 337... Línea 337...
337
    }
337
    }
Línea 338... Línea 338...
338
 
338
 
339
    /**
339
    /**
340
     * Export + Delete quiz data for a user who has made a single attempt.
340
     * Export + Delete quiz data for a user who has made a single attempt.
341
     */
341
     */
342
    public function test_wrong_context() {
342
    public function test_wrong_context(): void {
343
        global $DB;
343
        global $DB;
Línea 344... Línea 344...
344
        $this->resetAfterTest(true);
344
        $this->resetAfterTest(true);
345
 
345
 
Línea 464... Línea 464...
464
    }
464
    }
Línea 465... Línea 465...
465
 
465
 
466
    /**
466
    /**
467
     * Test for provider::get_users_in_context().
467
     * Test for provider::get_users_in_context().
468
     */
468
     */
469
    public function test_get_users_in_context() {
469
    public function test_get_users_in_context(): void {
470
        global $DB;
470
        global $DB;
Línea 471... Línea 471...
471
        $this->resetAfterTest(true);
471
        $this->resetAfterTest(true);
472
 
472
 
Línea 500... Línea 500...
500
    }
500
    }
Línea 501... Línea 501...
501
 
501
 
502
    /**
502
    /**
503
     * Test for provider::delete_data_for_users().
503
     * Test for provider::delete_data_for_users().
504
     */
504
     */
505
    public function test_delete_data_for_users() {
505
    public function test_delete_data_for_users(): void {
506
        global $DB;
506
        global $DB;
Línea 507... Línea 507...
507
        $this->resetAfterTest(true);
507
        $this->resetAfterTest(true);
508
 
508