Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 41... Línea 41...
41
class provider_test extends \core_privacy\tests\provider_testcase {
41
class provider_test extends \core_privacy\tests\provider_testcase {
Línea 42... Línea 42...
42
 
42
 
43
    /**
43
    /**
44
     * Test getting the context for the user ID related to this plugin.
44
     * Test getting the context for the user ID related to this plugin.
45
     */
45
     */
46
    public function test_get_contexts_for_userid() {
46
    public function test_get_contexts_for_userid(): void {
47
        $this->resetAfterTest();
47
        $this->resetAfterTest();
Línea 48... Línea 48...
48
        $generator = $this->getDataGenerator();
48
        $generator = $this->getDataGenerator();
49
 
49
 
Línea 87... Línea 87...
87
    }
87
    }
Línea 88... Línea 88...
88
 
88
 
89
    /**
89
    /**
90
     * Test getting users in the context ID related to this plugin.
90
     * Test getting users in the context ID related to this plugin.
91
     */
91
     */
92
    public function test_get_users_in_context() {
92
    public function test_get_users_in_context(): void {
93
        $this->resetAfterTest();
93
        $this->resetAfterTest();
94
        $generator = $this->getDataGenerator();
94
        $generator = $this->getDataGenerator();
Línea 95... Línea 95...
95
        $component = 'block_recentlyaccesseditems';
95
        $component = 'block_recentlyaccesseditems';
Línea 144... Línea 144...
144
    }
144
    }
Línea 145... Línea 145...
145
 
145
 
146
    /**
146
    /**
147
     * Test fetching information about user data stored.
147
     * Test fetching information about user data stored.
148
     */
148
     */
149
    public function test_get_metadata() {
149
    public function test_get_metadata(): void {
150
        $collection = new \core_privacy\local\metadata\collection('block_recentlyaccesseditems');
150
        $collection = new \core_privacy\local\metadata\collection('block_recentlyaccesseditems');
151
        $newcollection = provider::get_metadata($collection);
151
        $newcollection = provider::get_metadata($collection);
152
        $itemcollection = $newcollection->get_collection();
152
        $itemcollection = $newcollection->get_collection();
Línea 166... Línea 166...
166
    }
166
    }
Línea 167... Línea 167...
167
 
167
 
168
    /**
168
    /**
169
     * Test exporting data for an approved contextlist.
169
     * Test exporting data for an approved contextlist.
170
     */
170
     */
171
    public function test_export_user_data() {
171
    public function test_export_user_data(): void {
Línea 172... Línea 172...
172
        global $DB;
172
        global $DB;
173
 
173
 
174
        $this->resetAfterTest();
174
        $this->resetAfterTest();
Línea 219... Línea 219...
219
    }
219
    }
Línea 220... Línea 220...
220
 
220
 
221
    /**
221
    /**
222
     * Test exporting data for an approved contextlist with a deleted course
222
     * Test exporting data for an approved contextlist with a deleted course
223
     */
223
     */
224
    public function test_export_user_data_with_deleted_course() {
224
    public function test_export_user_data_with_deleted_course(): void {
Línea 225... Línea 225...
225
        global $DB;
225
        global $DB;
226
 
226
 
227
        $this->resetAfterTest();
227
        $this->resetAfterTest();
Línea 266... Línea 266...
266
    }
266
    }
Línea 267... Línea 267...
267
 
267
 
268
    /**
268
    /**
269
     * Test deleting data for all users within an approved contextlist.
269
     * Test deleting data for all users within an approved contextlist.
270
     */
270
     */
271
    public function test_delete_data_for_all_users_in_context() {
271
    public function test_delete_data_for_all_users_in_context(): void {
Línea 272... Línea 272...
272
        global $DB;
272
        global $DB;
273
 
273
 
Línea 334... Línea 334...
334
    }
334
    }
Línea 335... Línea 335...
335
 
335
 
336
    /**
336
    /**
337
     * Test deleting data within an approved contextlist for a user.
337
     * Test deleting data within an approved contextlist for a user.
338
     */
338
     */
339
    public function test_delete_data_for_user() {
339
    public function test_delete_data_for_user(): void {
Línea 340... Línea 340...
340
        global $DB;
340
        global $DB;
341
 
341
 
342
        $this->resetAfterTest();
342
        $this->resetAfterTest();
Línea 414... Línea 414...
414
    }
414
    }
Línea 415... Línea 415...
415
 
415
 
416
    /**
416
    /**
417
     * Test deleting data within a context for an approved userlist.
417
     * Test deleting data within a context for an approved userlist.
418
     */
418
     */
419
    public function test_delete_data_for_users() {
419
    public function test_delete_data_for_users(): void {
Línea 420... Línea 420...
420
        global $DB;
420
        global $DB;
421
 
421
 
422
        $this->resetAfterTest();
422
        $this->resetAfterTest();