Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 43... Línea 43...
43
    }
43
    }
Línea 44... Línea 44...
44
 
44
 
45
    /**
45
    /**
46
     * Test getting the context for the user ID related to this plugin.
46
     * Test getting the context for the user ID related to this plugin.
47
     */
47
     */
48
    public function test_get_contexts_for_userid() {
48
    public function test_get_contexts_for_userid(): void {
49
        global $DB;
49
        global $DB;
50
        // Create profile category.
50
        // Create profile category.
51
        $categoryid = $this->add_profile_category();
51
        $categoryid = $this->add_profile_category();
52
        // Create profile field.
52
        // Create profile field.
Línea 64... Línea 64...
64
    }
64
    }
Línea 65... Línea 65...
65
 
65
 
66
    /**
66
    /**
67
     * Test that data is exported correctly for this plugin.
67
     * Test that data is exported correctly for this plugin.
68
     */
68
     */
69
    public function test_export_user_data() {
69
    public function test_export_user_data(): void {
70
        // Create profile category.
70
        // Create profile category.
71
        $categoryid = $this->add_profile_category();
71
        $categoryid = $this->add_profile_category();
72
        // Create text profile field.
72
        // Create text profile field.
73
        $textprofilefieldid = $this->add_profile_field($categoryid, 'text');
73
        $textprofilefieldid = $this->add_profile_field($categoryid, 'text');
Línea 91... Línea 91...
91
    }
91
    }
Línea 92... Línea 92...
92
 
92
 
93
    /**
93
    /**
94
     * Test that user data is deleted using the context.
94
     * Test that user data is deleted using the context.
95
     */
95
     */
96
    public function test_delete_data_for_all_users_in_context() {
96
    public function test_delete_data_for_all_users_in_context(): void {
97
        global $DB;
97
        global $DB;
98
        // Create profile category.
98
        // Create profile category.
99
        $categoryid = $this->add_profile_category();
99
        $categoryid = $this->add_profile_category();
100
        // Create text profile field.
100
        // Create text profile field.
Línea 119... Línea 119...
119
    }
119
    }
Línea 120... Línea 120...
120
 
120
 
121
    /**
121
    /**
122
     * Test that user data is deleted for this user.
122
     * Test that user data is deleted for this user.
123
     */
123
     */
124
    public function test_delete_data_for_user() {
124
    public function test_delete_data_for_user(): void {
125
        global $DB;
125
        global $DB;
126
        // Create profile category.
126
        // Create profile category.
127
        $categoryid = $this->add_profile_category();
127
        $categoryid = $this->add_profile_category();
128
        // Create text profile field.
128
        // Create text profile field.
Línea 149... Línea 149...
149
    }
149
    }
Línea 150... Línea 150...
150
 
150
 
151
    /**
151
    /**
152
     * Test that only users with a user context are fetched.
152
     * Test that only users with a user context are fetched.
153
     */
153
     */
154
    public function test_get_users_in_context() {
154
    public function test_get_users_in_context(): void {
Línea 155... Línea 155...
155
        $this->resetAfterTest();
155
        $this->resetAfterTest();
156
 
156
 
157
        $component = 'profilefield_text';
157
        $component = 'profilefield_text';
Línea 185... Línea 185...
185
    }
185
    }
Línea 186... Línea 186...
186
 
186
 
187
    /**
187
    /**
188
     * Test that data for users in approved userlist is deleted.
188
     * Test that data for users in approved userlist is deleted.
189
     */
189
     */
190
    public function test_delete_data_for_users() {
190
    public function test_delete_data_for_users(): void {
Línea 191... Línea 191...
191
        $this->resetAfterTest();
191
        $this->resetAfterTest();
192
 
192
 
193
        $component = 'profilefield_text';
193
        $component = 'profilefield_text';