Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 45... Línea 45...
45
    }
45
    }
Línea 46... Línea 46...
46
 
46
 
47
    /**
47
    /**
48
     * Test getting the context for the user ID related to this plugin.
48
     * Test getting the context for the user ID related to this plugin.
49
     */
49
     */
50
    public function test_get_contexts_for_userid() {
50
    public function test_get_contexts_for_userid(): void {
51
        global $DB;
51
        global $DB;
52
        // Create profile category.
52
        // Create profile category.
53
        $categoryid = $this->add_profile_category();
53
        $categoryid = $this->add_profile_category();
54
        // Create profile field.
54
        // Create profile field.
Línea 66... Línea 66...
66
    }
66
    }
Línea 67... Línea 67...
67
 
67
 
68
    /**
68
    /**
69
     * Test that data is exported correctly for this plugin.
69
     * Test that data is exported correctly for this plugin.
70
     */
70
     */
71
    public function test_export_user_data() {
71
    public function test_export_user_data(): void {
72
        // Create profile category.
72
        // Create profile category.
73
        $categoryid = $this->add_profile_category();
73
        $categoryid = $this->add_profile_category();
74
        // Create menu profile field.
74
        // Create menu profile field.
75
        $menuprofilefieldid = $this->add_profile_field($categoryid, 'menu');
75
        $menuprofilefieldid = $this->add_profile_field($categoryid, 'menu');
Línea 93... Línea 93...
93
    }
93
    }
Línea 94... Línea 94...
94
 
94
 
95
    /**
95
    /**
96
     * Test that user data is deleted using the context.
96
     * Test that user data is deleted using the context.
97
     */
97
     */
98
    public function test_delete_data_for_all_users_in_context() {
98
    public function test_delete_data_for_all_users_in_context(): void {
99
        global $DB;
99
        global $DB;
100
        // Create profile category.
100
        // Create profile category.
101
        $categoryid = $this->add_profile_category();
101
        $categoryid = $this->add_profile_category();
102
        // Create menu profile field.
102
        // Create menu profile field.
Línea 121... Línea 121...
121
    }
121
    }
Línea 122... Línea 122...
122
 
122
 
123
    /**
123
    /**
124
     * Test that user data is deleted for this user.
124
     * Test that user data is deleted for this user.
125
     */
125
     */
126
    public function test_delete_data_for_user() {
126
    public function test_delete_data_for_user(): void {
127
        global $DB;
127
        global $DB;
128
        // Create profile category.
128
        // Create profile category.
129
        $categoryid = $this->add_profile_category();
129
        $categoryid = $this->add_profile_category();
130
        // Create menu profile field.
130
        // Create menu profile field.
Línea 151... Línea 151...
151
    }
151
    }
Línea 152... Línea 152...
152
 
152
 
153
    /**
153
    /**
154
     * Test that only users with a user context are fetched.
154
     * Test that only users with a user context are fetched.
155
     */
155
     */
156
    public function test_get_users_in_context() {
156
    public function test_get_users_in_context(): void {
Línea 157... Línea 157...
157
        $this->resetAfterTest();
157
        $this->resetAfterTest();
158
 
158
 
159
        $component = 'profilefield_menu';
159
        $component = 'profilefield_menu';
Línea 187... Línea 187...
187
    }
187
    }
Línea 188... Línea 188...
188
 
188
 
189
    /**
189
    /**
190
     * Test that data for users in approved userlist is deleted.
190
     * Test that data for users in approved userlist is deleted.
191
     */
191
     */
192
    public function test_delete_data_for_users() {
192
    public function test_delete_data_for_users(): void {
Línea 193... Línea 193...
193
        $this->resetAfterTest();
193
        $this->resetAfterTest();
194
 
194
 
195
        $component = 'profilefield_menu';
195
        $component = 'profilefield_menu';