Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 61... Línea 61...
61
    }
61
    }
Línea 62... Línea 62...
62
 
62
 
63
    /**
63
    /**
64
     * Tests for calendar_event_created event.
64
     * Tests for calendar_event_created event.
65
     */
65
     */
Línea 66... Línea 66...
66
    public function test_calendar_event_created() {
66
    public function test_calendar_event_created(): void {
Línea 67... Línea 67...
67
 
67
 
68
        $this->resetAfterTest();
68
        $this->resetAfterTest();
Línea 109... Línea 109...
109
    }
109
    }
Línea 110... Línea 110...
110
 
110
 
111
    /**
111
    /**
112
     * Tests for event validations related to calendar_event_created event.
112
     * Tests for event validations related to calendar_event_created event.
113
     */
113
     */
114
    public function test_calendar_event_created_validations() {
114
    public function test_calendar_event_created_validations(): void {
115
        $this->resetAfterTest();
115
        $this->resetAfterTest();
Línea 116... Línea 116...
116
        $context = \context_user::instance($this->user->id);
116
        $context = \context_user::instance($this->user->id);
117
 
117
 
Línea 165... Línea 165...
165
    }
165
    }
Línea 166... Línea 166...
166
 
166
 
167
    /**
167
    /**
168
     * Tests for calendar_event_updated event.
168
     * Tests for calendar_event_updated event.
169
     */
169
     */
Línea 170... Línea 170...
170
    public function test_calendar_event_updated() {
170
    public function test_calendar_event_updated(): void {
Línea 171... Línea 171...
171
 
171
 
172
        $this->resetAfterTest();
172
        $this->resetAfterTest();
Línea 220... Línea 220...
220
    }
220
    }
Línea 221... Línea 221...
221
 
221
 
222
    /**
222
    /**
223
     * Tests for calendar_event_updated event.
223
     * Tests for calendar_event_updated event.
224
     */
224
     */
225
    public function test_calendar_event_updated_toggle_visibility() {
225
    public function test_calendar_event_updated_toggle_visibility(): void {
226
        global $DB;
226
        global $DB;
Línea 227... Línea 227...
227
        $siteid = 0;
227
        $siteid = 0;
Línea 253... Línea 253...
253
    }
253
    }
Línea 254... Línea 254...
254
 
254
 
255
    /**
255
    /**
256
     * Tests for event validations related to calendar_event_created event.
256
     * Tests for event validations related to calendar_event_created event.
257
     */
257
     */
258
    public function test_calendar_event_updated_validations() {
258
    public function test_calendar_event_updated_validations(): void {
259
        $this->resetAfterTest();
259
        $this->resetAfterTest();
Línea 260... Línea 260...
260
        $context = \context_user::instance($this->user->id);
260
        $context = \context_user::instance($this->user->id);
261
 
261
 
Línea 309... Línea 309...
309
    }
309
    }
Línea 310... Línea 310...
310
 
310
 
311
    /**
311
    /**
312
     * Tests for calendar_event_deleted event.
312
     * Tests for calendar_event_deleted event.
313
     */
313
     */
314
    public function test_calendar_event_deleted() {
314
    public function test_calendar_event_deleted(): void {
Línea 315... Línea 315...
315
        global $DB;
315
        global $DB;
Línea 316... Línea 316...
316
 
316
 
Línea 365... Línea 365...
365
    }
365
    }
Línea 366... Línea 366...
366
 
366
 
367
    /**
367
    /**
368
     * Tests for event validations related to calendar_event_deleted event.
368
     * Tests for event validations related to calendar_event_deleted event.
369
     */
369
     */
370
    public function test_calendar_event_deleted_validations() {
370
    public function test_calendar_event_deleted_validations(): void {
371
        $this->resetAfterTest();
371
        $this->resetAfterTest();
Línea 372... Línea 372...
372
        $context = \context_user::instance($this->user->id);
372
        $context = \context_user::instance($this->user->id);
373
 
373
 
Línea 421... Línea 421...
421
    }
421
    }
Línea 422... Línea 422...
422
 
422
 
423
    /**
423
    /**
424
     * Tests for calendar_subscription_added event for a site subscription.
424
     * Tests for calendar_subscription_added event for a site subscription.
425
     */
425
     */
426
    public function test_calendar_subscription_created_site() {
426
    public function test_calendar_subscription_created_site(): void {
427
        global $CFG;
427
        global $CFG;
428
        require_once($CFG->dirroot . '/calendar/lib.php');
428
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 429... Línea 429...
429
        $this->resetAfterTest(true);
429
        $this->resetAfterTest(true);
Línea 452... Línea 452...
452
    }
452
    }
Línea 453... Línea 453...
453
 
453
 
454
    /**
454
    /**
455
     * Tests for calendar_subscription_added event for a category subscription.
455
     * Tests for calendar_subscription_added event for a category subscription.
456
     */
456
     */
457
    public function test_calendar_subscription_created_category() {
457
    public function test_calendar_subscription_created_category(): void {
458
        global $CFG;
458
        global $CFG;
459
        require_once($CFG->dirroot . '/calendar/lib.php');
459
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 460... Línea 460...
460
        $this->resetAfterTest(true);
460
        $this->resetAfterTest(true);
Línea 485... Línea 485...
485
    }
485
    }
Línea 486... Línea 486...
486
 
486
 
487
    /**
487
    /**
488
     * Tests for calendar_subscription_added event for a course subscription.
488
     * Tests for calendar_subscription_added event for a course subscription.
489
     */
489
     */
490
    public function test_calendar_subscription_created_course() {
490
    public function test_calendar_subscription_created_course(): void {
491
        global $CFG;
491
        global $CFG;
492
        require_once($CFG->dirroot . '/calendar/lib.php');
492
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 493... Línea 493...
493
        $this->resetAfterTest(true);
493
        $this->resetAfterTest(true);
Línea 517... Línea 517...
517
    }
517
    }
Línea 518... Línea 518...
518
 
518
 
519
    /**
519
    /**
520
     * Tests for calendar_subscription_added event for a group subscription.
520
     * Tests for calendar_subscription_added event for a group subscription.
521
     */
521
     */
522
    public function test_calendar_subscription_created_group() {
522
    public function test_calendar_subscription_created_group(): void {
523
        global $CFG;
523
        global $CFG;
524
        require_once($CFG->dirroot . '/calendar/lib.php');
524
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 525... Línea 525...
525
        $this->resetAfterTest(true);
525
        $this->resetAfterTest(true);
Línea 552... Línea 552...
552
    }
552
    }
Línea 553... Línea 553...
553
 
553
 
554
    /**
554
    /**
555
     * Tests for calendar_subscription_updated event for a site subscription.
555
     * Tests for calendar_subscription_updated event for a site subscription.
556
     */
556
     */
557
    public function test_calendar_subscription_updated_site() {
557
    public function test_calendar_subscription_updated_site(): void {
558
        global $CFG;
558
        global $CFG;
559
        require_once($CFG->dirroot . '/calendar/lib.php');
559
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 560... Línea 560...
560
        $this->resetAfterTest(true);
560
        $this->resetAfterTest(true);
Línea 585... Línea 585...
585
    }
585
    }
Línea 586... Línea 586...
586
 
586
 
587
    /**
587
    /**
588
     * Tests for calendar_subscription_updated event for a category subscription.
588
     * Tests for calendar_subscription_updated event for a category subscription.
589
     */
589
     */
590
    public function test_calendar_subscription_updated_category() {
590
    public function test_calendar_subscription_updated_category(): void {
591
        global $CFG;
591
        global $CFG;
592
        require_once($CFG->dirroot . '/calendar/lib.php');
592
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 593... Línea 593...
593
        $this->resetAfterTest(true);
593
        $this->resetAfterTest(true);
Línea 620... Línea 620...
620
    }
620
    }
Línea 621... Línea 621...
621
 
621
 
622
    /**
622
    /**
623
     * Tests for calendar_subscription_updated event for a group subscription.
623
     * Tests for calendar_subscription_updated event for a group subscription.
624
     */
624
     */
625
    public function test_calendar_subscription_updated_course() {
625
    public function test_calendar_subscription_updated_course(): void {
626
        global $CFG;
626
        global $CFG;
627
        require_once($CFG->dirroot . '/calendar/lib.php');
627
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 628... Línea 628...
628
        $this->resetAfterTest(true);
628
        $this->resetAfterTest(true);
Línea 653... Línea 653...
653
    }
653
    }
Línea 654... Línea 654...
654
 
654
 
655
    /**
655
    /**
656
     * Tests for calendar_subscription_updated event for a course subscription.
656
     * Tests for calendar_subscription_updated event for a course subscription.
657
     */
657
     */
658
    public function test_calendar_subscription_updated_group() {
658
    public function test_calendar_subscription_updated_group(): void {
659
        global $CFG;
659
        global $CFG;
660
        require_once($CFG->dirroot . '/calendar/lib.php');
660
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 661... Línea 661...
661
        $this->resetAfterTest(true);
661
        $this->resetAfterTest(true);
Línea 691... Línea 691...
691
    }
691
    }
Línea 692... Línea 692...
692
 
692
 
693
    /**
693
    /**
694
     * Tests for calendar_subscription_deleted event for a site subscription.
694
     * Tests for calendar_subscription_deleted event for a site subscription.
695
     */
695
     */
696
    public function test_calendar_subscription_deleted_site() {
696
    public function test_calendar_subscription_deleted_site(): void {
697
        global $CFG;
697
        global $CFG;
698
        require_once($CFG->dirroot . '/calendar/lib.php');
698
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 699... Línea 699...
699
        $this->resetAfterTest(true);
699
        $this->resetAfterTest(true);
Línea 720... Línea 720...
720
    }
720
    }
Línea 721... Línea 721...
721
 
721
 
722
    /**
722
    /**
723
     * Tests for calendar_subscription_deleted event for a category subscription.
723
     * Tests for calendar_subscription_deleted event for a category subscription.
724
     */
724
     */
725
    public function test_calendar_subscription_deleted_category() {
725
    public function test_calendar_subscription_deleted_category(): void {
726
        global $CFG;
726
        global $CFG;
727
        require_once($CFG->dirroot . '/calendar/lib.php');
727
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 728... Línea 728...
728
        $this->resetAfterTest(true);
728
        $this->resetAfterTest(true);
Línea 753... Línea 753...
753
    }
753
    }
Línea 754... Línea 754...
754
 
754
 
755
    /**
755
    /**
756
     * Tests for calendar_subscription_deleted event for a course.
756
     * Tests for calendar_subscription_deleted event for a course.
757
     */
757
     */
758
    public function test_calendar_subscription_deleted_course() {
758
    public function test_calendar_subscription_deleted_course(): void {
759
        global $CFG;
759
        global $CFG;
760
        require_once($CFG->dirroot . '/calendar/lib.php');
760
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 761... Línea 761...
761
        $this->resetAfterTest(true);
761
        $this->resetAfterTest(true);
Línea 784... Línea 784...
784
    }
784
    }
Línea 785... Línea 785...
785
 
785
 
786
    /**
786
    /**
787
     * Tests for calendar_subscription_deleted event for a group.
787
     * Tests for calendar_subscription_deleted event for a group.
788
     */
788
     */
789
    public function test_calendar_subscription_deleted_group() {
789
    public function test_calendar_subscription_deleted_group(): void {
790
        global $CFG;
790
        global $CFG;
791
        require_once($CFG->dirroot . '/calendar/lib.php');
791
        require_once($CFG->dirroot . '/calendar/lib.php');
Línea 792... Línea 792...
792
        $this->resetAfterTest(true);
792
        $this->resetAfterTest(true);