Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 72... Línea 72...
72
    }
72
    }
Línea 73... Línea 73...
73
 
73
 
74
    /**
74
    /**
75
     * Test that the module context for a user who last modified the module is retrieved.
75
     * Test that the module context for a user who last modified the module is retrieved.
76
     */
76
     */
77
    public function test_get_contexts_for_userid() {
77
    public function test_get_contexts_for_userid(): void {
Línea 78... Línea 78...
78
        $this->setup_test_data();
78
        $this->setup_test_data();
79
 
79
 
80
        $contexts = provider::get_contexts_for_userid($this->user->id);
80
        $contexts = provider::get_contexts_for_userid($this->user->id);
81
        $contextids = $contexts->get_contextids();
81
        $contextids = $contexts->get_contextids();
Línea 82... Línea 82...
82
        $this->assertEquals(\context_module::instance($this->quiz->cmid)->id, reset($contextids));
82
        $this->assertEquals(\context_module::instance($this->quiz->cmid)->id, reset($contextids));
83
    }
83
    }
84
 
84
 
85
    /**
85
    /**
86
     * That that no module context is found for a user who has not modified any quiz settings.
86
     * That that no module context is found for a user who has not modified any quiz settings.
Línea 87... Línea 87...
87
     */
87
     */
88
    public function test_get_no_contexts_for_userid() {
88
    public function test_get_no_contexts_for_userid(): void {
89
        $this->resetAfterTest();
89
        $this->resetAfterTest();
Línea 95... Línea 95...
95
    }
95
    }
Línea 96... Línea 96...
96
 
96
 
97
    /**
97
    /**
98
     * Test that user data is exported in format expected.
98
     * Test that user data is exported in format expected.
99
     */
99
     */
100
    public function test_export_user_data() {
100
    public function test_export_user_data(): void {
Línea 101... Línea 101...
101
        $this->setup_test_data();
101
        $this->setup_test_data();
Línea 102... Línea 102...
102
 
102
 
Línea 158... Línea 158...
158
    }
158
    }
Línea 159... Línea 159...
159
 
159
 
160
    /**
160
    /**
161
     * Test that a userlist with module context is populated by usermodified user.
161
     * Test that a userlist with module context is populated by usermodified user.
162
     */
162
     */
163
    public function test_get_users_in_context() {
163
    public function test_get_users_in_context(): void {
Línea 164... Línea 164...
164
        $this->setup_test_data();
164
        $this->setup_test_data();
165
 
165
 
Línea 172... Línea 172...
172
    }
172
    }
Línea 173... Línea 173...
173
 
173
 
174
    /**
174
    /**
175
     * Test that data is deleted for a list of users.
175
     * Test that data is deleted for a list of users.
176
     */
176
     */
177
    public function test_delete_data_for_users() {
177
    public function test_delete_data_for_users(): void {
Línea 178... Línea 178...
178
        $this->setup_test_data();
178
        $this->setup_test_data();
179
 
179
 
Línea 193... Línea 193...
193
    }
193
    }
Línea 194... Línea 194...
194
 
194
 
195
    /**
195
    /**
196
     * Test that data is deleted for a list of contexts.
196
     * Test that data is deleted for a list of contexts.
197
     */
197
     */
198
    public function test_delete_data_for_user() {
198
    public function test_delete_data_for_user(): void {
Línea 199... Línea 199...
199
        $this->setup_test_data();
199
        $this->setup_test_data();
200
 
200
 
201
        $context = \context_module::instance($this->quiz->cmid);
201
        $context = \context_module::instance($this->quiz->cmid);
Línea 215... Línea 215...
215
    }
215
    }
Línea 216... Línea 216...
216
 
216
 
217
    /**
217
    /**
218
     * Test that data is deleted for a single context.
218
     * Test that data is deleted for a single context.
219
     */
219
     */
220
    public function test_delete_data_for_all_users_in_context() {
220
    public function test_delete_data_for_all_users_in_context(): void {
Línea 221... Línea 221...
221
        $this->setup_test_data();
221
        $this->setup_test_data();
Línea 222... Línea 222...
222
 
222