Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 35... Línea 35...
35
    /**
35
    /**
36
     * Check that a user context is returned if there is any user data for this user.
36
     * Check that a user context is returned if there is any user data for this user.
37
     *
37
     *
38
     * @covers ::get_contexts_for_userid
38
     * @covers ::get_contexts_for_userid
39
     */
39
     */
40
    public function test_get_contexts_for_userid() {
40
    public function test_get_contexts_for_userid(): void {
41
        $this->resetAfterTest();
41
        $this->resetAfterTest();
42
        $user = $this->getDataGenerator()->create_user();
42
        $user = $this->getDataGenerator()->create_user();
Línea 43... Línea 43...
43
 
43
 
44
        // Check that there are no contexts used for the user yet.
44
        // Check that there are no contexts used for the user yet.
Línea 59... Línea 59...
59
    /**
59
    /**
60
     * Test that only users within a user context are fetched.
60
     * Test that only users within a user context are fetched.
61
     *
61
     *
62
     * @covers ::get_users_in_context
62
     * @covers ::get_users_in_context
63
     */
63
     */
64
    public function test_get_users_in_context() {
64
    public function test_get_users_in_context(): void {
65
        $this->resetAfterTest();
65
        $this->resetAfterTest();
Línea 66... Línea 66...
66
 
66
 
67
        // Create some users.
67
        // Create some users.
68
        $user1 = $this->getDataGenerator()->create_user();
68
        $user1 = $this->getDataGenerator()->create_user();
Línea 98... Línea 98...
98
    /**
98
    /**
99
     * Test that user data is exported correctly.
99
     * Test that user data is exported correctly.
100
     *
100
     *
101
     * @covers ::export_user_data
101
     * @covers ::export_user_data
102
     */
102
     */
103
    public function test_export_user_data() {
103
    public function test_export_user_data(): void {
104
        global $DB;
104
        global $DB;
105
        $this->resetAfterTest();
105
        $this->resetAfterTest();
Línea 106... Línea 106...
106
 
106
 
107
        // Create some users.
107
        // Create some users.
Línea 144... Línea 144...
144
    /**
144
    /**
145
     * Test deleting all user data for a specific context.
145
     * Test deleting all user data for a specific context.
146
     *
146
     *
147
     * @covers ::delete_data_for_all_users_in_context
147
     * @covers ::delete_data_for_all_users_in_context
148
     */
148
     */
149
    public function test_delete_data_for_all_users_in_context() {
149
    public function test_delete_data_for_all_users_in_context(): void {
150
        global $DB;
150
        global $DB;
151
        $this->resetAfterTest();
151
        $this->resetAfterTest();
Línea 152... Línea 152...
152
 
152
 
153
        // Create some users.
153
        // Create some users.
Línea 175... Línea 175...
175
    /**
175
    /**
176
     * Test deleting a user's data for a specific context.
176
     * Test deleting a user's data for a specific context.
177
     *
177
     *
178
     * @covers ::delete_data_for_user
178
     * @covers ::delete_data_for_user
179
     */
179
     */
180
    public function test_delete_data_for_user() {
180
    public function test_delete_data_for_user(): void {
181
        global $DB;
181
        global $DB;
182
        $this->resetAfterTest();
182
        $this->resetAfterTest();
Línea 183... Línea 183...
183
 
183
 
184
        // Create some users.
184
        // Create some users.
Línea 207... Línea 207...
207
    /**
207
    /**
208
     * Test that data for users in an approved userlist is deleted.
208
     * Test that data for users in an approved userlist is deleted.
209
     *
209
     *
210
     * @covers ::delete_data_for_users
210
     * @covers ::delete_data_for_users
211
     */
211
     */
212
    public function test_delete_data_for_users() {
212
    public function test_delete_data_for_users(): void {
213
        global $DB;
213
        global $DB;
214
        $this->resetAfterTest();
214
        $this->resetAfterTest();
Línea 215... Línea 215...
215
 
215
 
216
        // Create some users.
216
        // Create some users.