Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 40... Línea 40...
40
class provider_test extends provider_testcase {
40
class provider_test extends provider_testcase {
Línea 41... Línea 41...
41
 
41
 
42
    /**
42
    /**
43
     * Test for provider::get_metadata().
43
     * Test for provider::get_metadata().
44
     */
44
     */
45
    public function test_get_metadata() {
45
    public function test_get_metadata(): void {
46
        $collection = new collection('core_group');
46
        $collection = new collection('core_group');
47
        $newcollection = provider::get_metadata($collection);
47
        $newcollection = provider::get_metadata($collection);
48
        $itemcollection = $newcollection->get_collection();
48
        $itemcollection = $newcollection->get_collection();
Línea 63... Línea 63...
63
    }
63
    }
Línea 64... Línea 64...
64
 
64
 
65
    /**
65
    /**
66
     * Test for provider::export_groups() to export manual group memberships.
66
     * Test for provider::export_groups() to export manual group memberships.
67
     */
67
     */
68
    public function test_export_groups() {
68
    public function test_export_groups(): void {
Línea 69... Línea 69...
69
        $this->resetAfterTest();
69
        $this->resetAfterTest();
70
 
70
 
71
        $course = $this->getDataGenerator()->create_course();
71
        $course = $this->getDataGenerator()->create_course();
Línea 104... Línea 104...
104
    }
104
    }
Línea 105... Línea 105...
105
 
105
 
106
    /**
106
    /**
107
     * Test for provider::export_groups() to export group memberships of a component.
107
     * Test for provider::export_groups() to export group memberships of a component.
108
     */
108
     */
109
    public function test_export_groups_for_component() {
109
    public function test_export_groups_for_component(): void {
Línea 110... Línea 110...
110
        $this->resetAfterTest();
110
        $this->resetAfterTest();
111
 
111
 
112
        $course = $this->getDataGenerator()->create_course();
112
        $course = $this->getDataGenerator()->create_course();
Línea 149... Línea 149...
149
    }
149
    }
Línea 150... Línea 150...
150
 
150
 
151
    /**
151
    /**
152
     * Test for provider::delete_groups_for_all_users() to delete manual group memberships.
152
     * Test for provider::delete_groups_for_all_users() to delete manual group memberships.
153
     */
153
     */
154
    public function test_delete_groups_for_all_users() {
154
    public function test_delete_groups_for_all_users(): void {
Línea 155... Línea 155...
155
        global $DB;
155
        global $DB;
Línea 156... Línea 156...
156
 
156
 
Línea 212... Línea 212...
212
    }
212
    }
Línea 213... Línea 213...
213
 
213
 
214
    /**
214
    /**
215
     * Test for provider::delete_groups_for_all_users() to delete group memberships of a component.
215
     * Test for provider::delete_groups_for_all_users() to delete group memberships of a component.
216
     */
216
     */
217
    public function test_delete_groups_for_all_users_for_component() {
217
    public function test_delete_groups_for_all_users_for_component(): void {
Línea 218... Línea 218...
218
        global $DB;
218
        global $DB;
Línea 219... Línea 219...
219
 
219
 
Línea 277... Línea 277...
277
    }
277
    }
Línea 278... Línea 278...
278
 
278
 
279
    /**
279
    /**
280
     * Test for provider::delete_groups_for_all_users() to check deleting from cache.
280
     * Test for provider::delete_groups_for_all_users() to check deleting from cache.
281
     */
281
     */
282
    public function test_delete_groups_for_all_users_deletes_cache() {
282
    public function test_delete_groups_for_all_users_deletes_cache(): void {
Línea 283... Línea 283...
283
        $this->resetAfterTest();
283
        $this->resetAfterTest();
Línea 284... Línea 284...
284
 
284
 
Línea 308... Línea 308...
308
    }
308
    }
Línea 309... Línea 309...
309
 
309
 
310
    /**
310
    /**
311
     * Test for provider::delete_groups_for_user() to delete manual group memberships.
311
     * Test for provider::delete_groups_for_user() to delete manual group memberships.
312
     */
312
     */
313
    public function test_delete_groups_for_user() {
313
    public function test_delete_groups_for_user(): void {
Línea 314... Línea 314...
314
        global $DB;
314
        global $DB;
Línea 315... Línea 315...
315
 
315
 
Línea 410... Línea 410...
410
    }
410
    }
Línea 411... Línea 411...
411
 
411
 
412
    /**
412
    /**
413
     * Test for provider::delete_groups_for_user() to delete group memberships of a component.
413
     * Test for provider::delete_groups_for_user() to delete group memberships of a component.
414
     */
414
     */
415
    public function test_delete_groups_for_user_for_component() {
415
    public function test_delete_groups_for_user_for_component(): void {
Línea 416... Línea 416...
416
        global $DB;
416
        global $DB;
Línea 417... Línea 417...
417
 
417
 
Línea 514... Línea 514...
514
    }
514
    }
Línea 515... Línea 515...
515
 
515
 
516
    /**
516
    /**
517
     * Test for provider::delete_groups_for_users() to delete group memberships of a component.
517
     * Test for provider::delete_groups_for_users() to delete group memberships of a component.
518
     */
518
     */
519
    public function test_delete_groups_for_users_for_component() {
519
    public function test_delete_groups_for_users_for_component(): void {
Línea 520... Línea 520...
520
        global $DB;
520
        global $DB;
Línea 521... Línea 521...
521
 
521
 
Línea 653... Línea 653...
653
    }
653
    }
Línea 654... Línea 654...
654
 
654
 
655
    /**
655
    /**
656
     * Test for provider::delete_groups_for_user() to check deleting from cache.
656
     * Test for provider::delete_groups_for_user() to check deleting from cache.
657
     */
657
     */
658
    public function test_delete_groups_for_user_deletes_cache() {
658
    public function test_delete_groups_for_user_deletes_cache(): void {
Línea 659... Línea 659...
659
        $this->resetAfterTest();
659
        $this->resetAfterTest();
Línea 660... Línea 660...
660
 
660
 
Línea 681... Línea 681...
681
    }
681
    }
Línea 682... Línea 682...
682
 
682
 
683
    /**
683
    /**
684
     * Test for provider::get_contexts_for_userid().
684
     * Test for provider::get_contexts_for_userid().
685
     */
685
     */
686
    public function test_get_contexts_for_userid() {
686
    public function test_get_contexts_for_userid(): void {
Línea 687... Línea 687...
687
        $this->resetAfterTest();
687
        $this->resetAfterTest();
688
 
688
 
689
        $course1 = $this->getDataGenerator()->create_course();
689
        $course1 = $this->getDataGenerator()->create_course();
Línea 727... Línea 727...
727
    }
727
    }
Línea 728... Línea 728...
728
 
728
 
729
    /**
729
    /**
730
     * Test for provider::get_contexts_for_userid() when there are group memberships from other components.
730
     * Test for provider::get_contexts_for_userid() when there are group memberships from other components.
731
     */
731
     */
732
    public function test_get_contexts_for_userid_component() {
732
    public function test_get_contexts_for_userid_component(): void {
Línea 733... Línea 733...
733
        $this->resetAfterTest();
733
        $this->resetAfterTest();
734
 
734
 
Línea 764... Línea 764...
764
    }
764
    }
Línea 765... Línea 765...
765
 
765
 
766
    /**
766
    /**
767
     * Test for provider::export_user_data().
767
     * Test for provider::export_user_data().
768
     */
768
     */
769
    public function test_export_user_data() {
769
    public function test_export_user_data(): void {
Línea 770... Línea 770...
770
        $this->resetAfterTest();
770
        $this->resetAfterTest();
771
 
771
 
772
        $course = $this->getDataGenerator()->create_course();
772
        $course = $this->getDataGenerator()->create_course();
Línea 808... Línea 808...
808
    }
808
    }
Línea 809... Línea 809...
809
 
809
 
810
    /**
810
    /**
811
     * Test for provider::delete_data_for_all_users_in_context().
811
     * Test for provider::delete_data_for_all_users_in_context().
812
     */
812
     */
813
    public function test_delete_data_for_all_users_in_context() {
813
    public function test_delete_data_for_all_users_in_context(): void {
Línea 814... Línea 814...
814
        global $DB;
814
        global $DB;
Línea 815... Línea 815...
815
 
815
 
Línea 871... Línea 871...
871
    }
871
    }
Línea 872... Línea 872...
872
 
872
 
873
    /**
873
    /**
874
     * Test for provider::delete_data_for_user().
874
     * Test for provider::delete_data_for_user().
875
     */
875
     */
876
    public function test_delete_data_for_user() {
876
    public function test_delete_data_for_user(): void {
Línea 877... Línea 877...
877
        global $DB;
877
        global $DB;
Línea 878... Línea 878...
878
 
878
 
Línea 973... Línea 973...
973
    }
973
    }
Línea 974... Línea 974...
974
 
974
 
975
    /**
975
    /**
976
     * Test for provider::delete_data_for_users().
976
     * Test for provider::delete_data_for_users().
977
     */
977
     */
978
    public function test_delete_data_for_users() {
978
    public function test_delete_data_for_users(): void {
Línea 979... Línea 979...
979
        global $DB;
979
        global $DB;
Línea 980... Línea 980...
980
 
980
 
Línea 1045... Línea 1045...
1045
    }
1045
    }
Línea 1046... Línea 1046...
1046
 
1046
 
1047
    /**
1047
    /**
1048
     * Test for provider::get_users_in_context().
1048
     * Test for provider::get_users_in_context().
1049
     */
1049
     */
1050
    public function test_get_users_in_context() {
1050
    public function test_get_users_in_context(): void {
Línea 1051... Línea 1051...
1051
        $this->resetAfterTest();
1051
        $this->resetAfterTest();
1052
 
1052