Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 82... Línea 82...
82
    }
82
    }
Línea 83... Línea 83...
83
 
83
 
84
    /**
84
    /**
85
     * Test getting the context for the user ID related to this plugin.
85
     * Test getting the context for the user ID related to this plugin.
86
     */
86
     */
87
    public function test_get_contexts_for_userid() {
87
    public function test_get_contexts_for_userid(): void {
Línea 88... Línea 88...
88
        $contextlist = provider::get_contexts_for_userid($this->user->id);
88
        $contextlist = provider::get_contexts_for_userid($this->user->id);
Línea 89... Línea 89...
89
 
89
 
Línea 98... Línea 98...
98
    }
98
    }
Línea 99... Línea 99...
99
 
99
 
100
    /**
100
    /**
101
     * Test for provider::export_user_data().
101
     * Test for provider::export_user_data().
102
     */
102
     */
103
    public function test_export_for_context() {
103
    public function test_export_for_context(): void {
104
        $coursecontext = \context_course::instance($this->course->id);
104
        $coursecontext = \context_course::instance($this->course->id);
Línea 105... Línea 105...
105
        $cmcontext = \context_module::instance($this->activity->cmid);
105
        $cmcontext = \context_module::instance($this->activity->cmid);
106
 
106
 
Línea 132... Línea 132...
132
    }
132
    }
Línea 133... Línea 133...
133
 
133
 
134
    /**
134
    /**
135
     * Test for provider::delete_data_for_all_users_in_context().
135
     * Test for provider::delete_data_for_all_users_in_context().
136
     */
136
     */
137
    public function test_delete_data_for_all_users_in_context() {
137
    public function test_delete_data_for_all_users_in_context(): void {
Línea 138... Línea 138...
138
        global $DB;
138
        global $DB;
139
 
139
 
Línea 152... Línea 152...
152
    }
152
    }
Línea 153... Línea 153...
153
 
153
 
154
    /**
154
    /**
155
     * Test for provider::delete_data_for_user().
155
     * Test for provider::delete_data_for_user().
156
     */
156
     */
157
    public function test_delete_data_for_user() {
157
    public function test_delete_data_for_user(): void {
Línea 158... Línea 158...
158
        global $DB;
158
        global $DB;
159
 
159
 
Línea 206... Línea 206...
206
    }
206
    }
Línea 207... Línea 207...
207
 
207
 
208
    /**
208
    /**
209
     * Test for provider::get_users_in_context() when the context is a course.
209
     * Test for provider::get_users_in_context() when the context is a course.
210
     */
210
     */
211
    public function test_get_users_in_context_course() {
211
    public function test_get_users_in_context_course(): void {
212
        $coursecontext = \context_course::instance($this->course->id);
212
        $coursecontext = \context_course::instance($this->course->id);
213
        $userlist = new \core_privacy\local\request\userlist($coursecontext, 'enrol_paypal');
213
        $userlist = new \core_privacy\local\request\userlist($coursecontext, 'enrol_paypal');
Línea 214... Línea 214...
214
        provider::get_users_in_context($userlist);
214
        provider::get_users_in_context($userlist);
Línea 219... Línea 219...
219
    }
219
    }
Línea 220... Línea 220...
220
 
220
 
221
    /**
221
    /**
222
     * Test for provider::get_users_in_context() when the context is an activity.
222
     * Test for provider::get_users_in_context() when the context is an activity.
223
     */
223
     */
224
    public function test_get_users_in_context_activity() {
224
    public function test_get_users_in_context_activity(): void {
225
        $activityctx = \context_module::instance($this->activity->cmid);
225
        $activityctx = \context_module::instance($this->activity->cmid);
226
        $userlist = new \core_privacy\local\request\userlist($activityctx, 'enrol_paypal');
226
        $userlist = new \core_privacy\local\request\userlist($activityctx, 'enrol_paypal');
Línea 227... Línea 227...
227
        provider::get_users_in_context($userlist);
227
        provider::get_users_in_context($userlist);
Línea 232... Línea 232...
232
    }
232
    }
Línea 233... Línea 233...
233
 
233
 
234
    /**
234
    /**
235
     * Test for provider::delete_data_for_users() when the context is a course.
235
     * Test for provider::delete_data_for_users() when the context is a course.
236
     */
236
     */
237
    public function test_delete_data_for_users_course() {
237
    public function test_delete_data_for_users_course(): void {
Línea 238... Línea 238...
238
        global $DB;
238
        global $DB;
Línea 239... Línea 239...
239
 
239
 
Línea 262... Línea 262...
262
    }
262
    }
Línea 263... Línea 263...
263
 
263
 
264
    /**
264
    /**
265
     * Test for provider::delete_data_for_users() when the context is an activity.
265
     * Test for provider::delete_data_for_users() when the context is an activity.
266
     */
266
     */
267
    public function test_delete_data_for_users_activity() {
267
    public function test_delete_data_for_users_activity(): void {
Línea 268... Línea 268...
268
        global $DB;
268
        global $DB;
Línea 269... Línea 269...
269
 
269