Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 72... Línea 72...
72
        }
72
        }
Línea 73... Línea 73...
73
 
73
 
74
        return true;
74
        return true;
Línea 75... Línea 75...
75
    }
75
    }
76
 
76
 
Línea 77... Línea 77...
77
    public function test_sync() {
77
    public function test_sync(): void {
Línea 78... Línea 78...
78
        global $CFG, $DB;
78
        global $CFG, $DB;
Línea 442... Línea 442...
442
        delete_course($course3, false);
442
        delete_course($course3, false);
443
        delete_course($course4, false);
443
        delete_course($course4, false);
Línea 444... Línea 444...
444
 
444
 
Línea 445... Línea 445...
445
    }
445
    }
446
 
446
 
Línea 447... Línea 447...
447
    public function test_add_to_group() {
447
    public function test_add_to_group(): void {
Línea 448... Línea 448...
448
        global $CFG, $DB;
448
        global $CFG, $DB;
Línea 538... Línea 538...
538
 
538
 
539
    /**
539
    /**
540
     * Enrol users from another course into a course where one of the members is already enrolled
540
     * Enrol users from another course into a course where one of the members is already enrolled
541
     * and is a member of the same group.
541
     * and is a member of the same group.
542
     */
542
     */
543
    public function test_add_to_group_with_member() {
543
    public function test_add_to_group_with_member(): void {
Línea 544... Línea 544...
544
        global $CFG, $DB;
544
        global $CFG, $DB;
Línea 545... Línea 545...
545
 
545
 
Línea 633... Línea 633...
633
    }
633
    }
Línea 634... Línea 634...
634
 
634
 
635
    /**
635
    /**
636
     * Test user_enrolment_created event.
636
     * Test user_enrolment_created event.
637
     */
637
     */
638
    public function test_user_enrolment_created_event() {
638
    public function test_user_enrolment_created_event(): void {
Línea 639... Línea 639...
639
        global $DB;
639
        global $DB;
Línea 640... Línea 640...
640
 
640
 
Línea 665... Línea 665...
665
    }
665
    }
Línea 666... Línea 666...
666
 
666
 
667
    /**
667
    /**
668
     * Test user_enrolment_deleted event.
668
     * Test user_enrolment_deleted event.
669
     */
669
     */
670
    public function test_user_enrolment_deleted_event() {
670
    public function test_user_enrolment_deleted_event(): void {
Línea 671... Línea 671...
671
        global $DB;
671
        global $DB;
Línea 672... Línea 672...
672
 
672
 
Línea 698... Línea 698...
698
    }
698
    }
Línea 699... Línea 699...
699
 
699
 
700
    /**
700
    /**
701
     * Test user_enrolment_updated event.
701
     * Test user_enrolment_updated event.
702
     */
702
     */
703
    public function test_user_enrolment_updated_event() {
703
    public function test_user_enrolment_updated_event(): void {
Línea 704... Línea 704...
704
        global $DB;
704
        global $DB;
Línea 705... Línea 705...
705
 
705
 
Línea 733... Línea 733...
733
    }
733
    }
Línea 734... Línea 734...
734
 
734
 
735
    /**
735
    /**
736
     * Test that a new group with the name of the course is created.
736
     * Test that a new group with the name of the course is created.
737
     */
737
     */
738
    public function test_enrol_meta_create_new_group() {
738
    public function test_enrol_meta_create_new_group(): void {
739
        global $DB, $CFG;
739
        global $DB, $CFG;
740
        $this->resetAfterTest();
740
        $this->resetAfterTest();
741
        // Create two courses.
741
        // Create two courses.
742
        $course = $this->getDataGenerator()->create_course(array('fullname' => 'Mathematics'));
742
        $course = $this->getDataGenerator()->create_course(array('fullname' => 'Mathematics'));
Línea 773... Línea 773...
773
    }
773
    }
Línea 774... Línea 774...
774
 
774
 
775
    /**
775
    /**
776
     * Test that enrolment timestart-timeend is respected in meta course.
776
     * Test that enrolment timestart-timeend is respected in meta course.
777
     */
777
     */
778
    public function test_timeend() {
778
    public function test_timeend(): void {
Línea 779... Línea 779...
779
        global $CFG, $DB;
779
        global $CFG, $DB;
Línea 780... Línea 780...
780
 
780
 
Línea 897... Línea 897...
897
    }
897
    }
Línea 898... Línea 898...
898
 
898
 
899
    /**
899
    /**
900
     * Test for getting user enrolment actions.
900
     * Test for getting user enrolment actions.
901
     */
901
     */
902
    public function test_get_user_enrolment_actions() {
902
    public function test_get_user_enrolment_actions(): void {
903
        global $CFG, $PAGE;
903
        global $CFG, $PAGE;
Línea 904... Línea 904...
904
        $this->resetAfterTest();
904
        $this->resetAfterTest();
905
 
905
 
Línea 949... Línea 949...
949
    }
949
    }
Línea 950... Línea 950...
950
 
950
 
951
    /**
951
    /**
952
     * Test how data for instance editing is validated.
952
     * Test how data for instance editing is validated.
953
     */
953
     */
954
    public function test_edit_instance_validation() {
954
    public function test_edit_instance_validation(): void {
Línea 955... Línea 955...
955
        global $DB;
955
        global $DB;
Línea 956... Línea 956...
956
 
956
 
Línea 1094... Línea 1094...
1094
    /**
1094
    /**
1095
     * Test the behaviour of fill_enrol_custom_fields().
1095
     * Test the behaviour of fill_enrol_custom_fields().
1096
     *
1096
     *
1097
     * @covers ::fill_enrol_custom_fields
1097
     * @covers ::fill_enrol_custom_fields
1098
     */
1098
     */
1099
    public function test_fill_enrol_custom_fields() {
1099
    public function test_fill_enrol_custom_fields(): void {
1100
        $this->resetAfterTest();
1100
        $this->resetAfterTest();
Línea 1101... Línea 1101...
1101
 
1101
 
Línea 1102... Línea 1102...
1102
        $metaplugin = enrol_get_plugin('meta');
1102
        $metaplugin = enrol_get_plugin('meta');
Línea 1147... Línea 1147...
1147
    /**
1147
    /**
1148
     * Test the behaviour of validate_enrol_plugin_data().
1148
     * Test the behaviour of validate_enrol_plugin_data().
1149
     *
1149
     *
1150
     * @covers ::validate_enrol_plugin_data
1150
     * @covers ::validate_enrol_plugin_data
1151
     */
1151
     */
1152
    public function test_validate_enrol_plugin_data() {
1152
    public function test_validate_enrol_plugin_data(): void {
1153
        $this->resetAfterTest();
1153
        $this->resetAfterTest();
Línea 1154... Línea 1154...
1154
 
1154
 
Línea 1155... Línea 1155...
1155
        $cat = $this->getDataGenerator()->create_category();
1155
        $cat = $this->getDataGenerator()->create_category();
Línea 1221... Línea 1221...
1221
    /**
1221
    /**
1222
     * Test the behaviour of find_instance().
1222
     * Test the behaviour of find_instance().
1223
     *
1223
     *
1224
     * @covers ::find_instance
1224
     * @covers ::find_instance
1225
     */
1225
     */
1226
    public function test_find_instance() {
1226
    public function test_find_instance(): void {
1227
        global $DB;
1227
        global $DB;
1228
        $this->resetAfterTest();
1228
        $this->resetAfterTest();
Línea 1229... Línea 1229...
1229
 
1229
 
1230
        $cat = $this->getDataGenerator()->create_category();
1230
        $cat = $this->getDataGenerator()->create_category();