Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 35... Línea 35...
35
 
35
 
36
    /**
36
    /**
37
     * Test the competency framework created event.
37
     * Test the competency framework created event.
38
     *
38
     *
39
     */
39
     */
40
    public function test_competency_framework_created() {
40
    public function test_competency_framework_created(): void {
41
        $this->resetAfterTest(true);
41
        $this->resetAfterTest(true);
42
        $this->setAdminUser();
42
        $this->setAdminUser();
Línea 43... Línea 43...
43
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
43
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 66... Línea 66...
66
 
66
 
67
    /**
67
    /**
68
     * Test the competency framework deleted event.
68
     * Test the competency framework deleted event.
69
     *
69
     *
70
     */
70
     */
71
    public function test_competency_framework_deleted() {
71
    public function test_competency_framework_deleted(): void {
72
        $this->resetAfterTest(true);
72
        $this->resetAfterTest(true);
73
        $this->setAdminUser();
73
        $this->setAdminUser();
Línea 74... Línea 74...
74
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
74
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 93... Línea 93...
93
 
93
 
94
    /**
94
    /**
95
     * Test the competency framework updated event.
95
     * Test the competency framework updated event.
96
     *
96
     *
97
     */
97
     */
98
    public function test_competency_framework_updated() {
98
    public function test_competency_framework_updated(): void {
99
        $this->resetAfterTest(true);
99
        $this->resetAfterTest(true);
100
        $this->setAdminUser();
100
        $this->setAdminUser();
Línea 101... Línea 101...
101
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
101
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 121... Línea 121...
121
 
121
 
122
    /**
122
    /**
123
     * Test the competency framework viewed event.
123
     * Test the competency framework viewed event.
124
     *
124
     *
125
     */
125
     */
126
    public function test_competency_framework_viewed() {
126
    public function test_competency_framework_viewed(): void {
127
        $this->resetAfterTest(true);
127
        $this->resetAfterTest(true);
128
        $this->setAdminUser();
128
        $this->setAdminUser();
Línea 129... Línea 129...
129
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
129
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 148... Línea 148...
148
 
148
 
149
    /**
149
    /**
150
     * Test the competency viewed event.
150
     * Test the competency viewed event.
151
     *
151
     *
152
     */
152
     */
153
    public function test_competency_viewed() {
153
    public function test_competency_viewed(): void {
154
        $this->resetAfterTest(true);
154
        $this->resetAfterTest(true);
155
        $this->setAdminUser();
155
        $this->setAdminUser();
156
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
156
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
157
        $framework = $lpg->create_framework();
157
        $framework = $lpg->create_framework();
Línea 173... Línea 173...
173
 
173
 
174
    /**
174
    /**
175
     * Test the template viewed event.
175
     * Test the template viewed event.
176
     *
176
     *
177
     */
177
     */
178
    public function test_template_viewed() {
178
    public function test_template_viewed(): void {
179
        $this->resetAfterTest(true);
179
        $this->resetAfterTest(true);
180
        $this->setAdminUser();
180
        $this->setAdminUser();
181
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
181
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
182
        $template = $lpg->create_template();
182
        $template = $lpg->create_template();
Línea 196... Línea 196...
196
 
196
 
197
    /**
197
    /**
198
     * Test the template created event.
198
     * Test the template created event.
199
     *
199
     *
200
     */
200
     */
201
    public function test_template_created() {
201
    public function test_template_created(): void {
202
        $this->resetAfterTest(true);
202
        $this->resetAfterTest(true);
203
        $this->setAdminUser();
203
        $this->setAdminUser();
Línea 204... Línea 204...
204
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
204
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 225... Línea 225...
225
 
225
 
226
    /**
226
    /**
227
     * Test the template deleted event.
227
     * Test the template deleted event.
228
     *
228
     *
229
     */
229
     */
230
    public function test_template_deleted() {
230
    public function test_template_deleted(): void {
231
        $this->resetAfterTest(true);
231
        $this->resetAfterTest(true);
232
        $this->setAdminUser();
232
        $this->setAdminUser();
Línea 233... Línea 233...
233
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
233
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 252... Línea 252...
252
 
252
 
253
    /**
253
    /**
254
     * Test the template updated event.
254
     * Test the template updated event.
255
     *
255
     *
256
     */
256
     */
257
    public function test_template_updated() {
257
    public function test_template_updated(): void {
258
        $this->resetAfterTest(true);
258
        $this->resetAfterTest(true);
259
        $this->setAdminUser();
259
        $this->setAdminUser();
Línea 260... Línea 260...
260
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
260
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 280... Línea 280...
280
 
280
 
281
    /**
281
    /**
282
     * Test the competency updated event.
282
     * Test the competency updated event.
283
     *
283
     *
284
     */
284
     */
285
    public function test_competency_updated() {
285
    public function test_competency_updated(): void {
286
        $this->resetAfterTest(true);
286
        $this->resetAfterTest(true);
287
        $this->setAdminUser();
287
        $this->setAdminUser();
Línea 288... Línea 288...
288
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
288
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 313... Línea 313...
313
 
313
 
314
    /**
314
    /**
315
     * Test the competency created event.
315
     * Test the competency created event.
316
     *
316
     *
317
     */
317
     */
318
    public function test_competency_created() {
318
    public function test_competency_created(): void {
319
        $this->resetAfterTest(true);
319
        $this->resetAfterTest(true);
320
        $this->setAdminUser();
320
        $this->setAdminUser();
Línea 321... Línea 321...
321
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
321
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 344... Línea 344...
344
 
344
 
345
    /**
345
    /**
346
     * Test the competency created event by duplicate framework.
346
     * Test the competency created event by duplicate framework.
347
     *
347
     *
348
     */
348
     */
349
    public function test_competency_created_by_duplicateframework() {
349
    public function test_competency_created_by_duplicateframework(): void {
350
        $this->resetAfterTest(true);
350
        $this->resetAfterTest(true);
351
        $this->setAdminUser();
351
        $this->setAdminUser();
Línea 352... Línea 352...
352
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
352
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 380... Línea 380...
380
 
380
 
381
    /**
381
    /**
382
     * Test the competency deleted event.
382
     * Test the competency deleted event.
383
     *
383
     *
384
     */
384
     */
385
    public function test_competency_deleted() {
385
    public function test_competency_deleted(): void {
386
        $this->resetAfterTest(true);
386
        $this->resetAfterTest(true);
387
        $this->setAdminUser();
387
        $this->setAdminUser();
Línea 388... Línea 388...
388
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
388
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 410... Línea 410...
410
 
410
 
411
    /**
411
    /**
412
     * Test the competency deleted event by delete framework.
412
     * Test the competency deleted event by delete framework.
413
     *
413
     *
414
     */
414
     */
415
    public function test_competency_deleted_by_deleteframework() {
415
    public function test_competency_deleted_by_deleteframework(): void {
416
        $this->resetAfterTest(true);
416
        $this->resetAfterTest(true);
417
        $this->setAdminUser();
417
        $this->setAdminUser();
Línea 418... Línea 418...
418
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
418
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 446... Línea 446...
446
 
446
 
447
    /**
447
    /**
448
     * Test the plan created event.
448
     * Test the plan created event.
449
     *
449
     *
450
     */
450
     */
451
    public function test_plan_created() {
451
    public function test_plan_created(): void {
452
        $this->resetAfterTest(true);
452
        $this->resetAfterTest(true);
453
        $this->setAdminUser();
453
        $this->setAdminUser();
454
        $dg = $this->getDataGenerator();
454
        $dg = $this->getDataGenerator();
455
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
455
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 474... Línea 474...
474
 
474
 
475
    /**
475
    /**
476
     * Test the plan created event using template_cohort.
476
     * Test the plan created event using template_cohort.
477
     *
477
     *
478
     */
478
     */
479
    public function test_plan_created_using_templatecohort() {
479
    public function test_plan_created_using_templatecohort(): void {
480
        $this->resetAfterTest(true);
480
        $this->resetAfterTest(true);
481
        $this->setAdminUser();
481
        $this->setAdminUser();
482
        $dg = $this->getDataGenerator();
482
        $dg = $this->getDataGenerator();
483
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
483
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 517... Línea 517...
517
 
517
 
518
    /**
518
    /**
519
     * Test the plan updated event.
519
     * Test the plan updated event.
520
     *
520
     *
521
     */
521
     */
522
    public function test_plan_updated() {
522
    public function test_plan_updated(): void {
523
        $this->resetAfterTest(true);
523
        $this->resetAfterTest(true);
524
        $this->setAdminUser();
524
        $this->setAdminUser();
525
        $dg = $this->getDataGenerator();
525
        $dg = $this->getDataGenerator();
526
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
526
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 545... Línea 545...
545
 
545
 
546
    /**
546
    /**
547
     * Test the plan deleted event.
547
     * Test the plan deleted event.
548
     *
548
     *
549
     */
549
     */
550
    public function test_plan_deleted() {
550
    public function test_plan_deleted(): void {
551
        $this->resetAfterTest(true);
551
        $this->resetAfterTest(true);
552
        $this->setAdminUser();
552
        $this->setAdminUser();
553
        $dg = $this->getDataGenerator();
553
        $dg = $this->getDataGenerator();
554
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
554
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 572... Línea 572...
572
 
572
 
573
    /**
573
    /**
574
     * Test the plan viewed event.
574
     * Test the plan viewed event.
575
     *
575
     *
576
     */
576
     */
577
    public function test_plan_viewed() {
577
    public function test_plan_viewed(): void {
578
        $this->resetAfterTest(true);
578
        $this->resetAfterTest(true);
579
        $this->setAdminUser();
579
        $this->setAdminUser();
580
        $dg = $this->getDataGenerator();
580
        $dg = $this->getDataGenerator();
581
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
581
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 597... Línea 597...
597
 
597
 
598
    /**
598
    /**
599
     * Test the evidence of prior learning created event.
599
     * Test the evidence of prior learning created event.
600
     *
600
     *
601
     */
601
     */
602
    public function test_user_evidence_created() {
602
    public function test_user_evidence_created(): void {
603
        $this->resetAfterTest(true);
603
        $this->resetAfterTest(true);
604
        $this->setAdminUser();
604
        $this->setAdminUser();
605
        $dg = $this->getDataGenerator();
605
        $dg = $this->getDataGenerator();
Línea 628... Línea 628...
628
 
628
 
629
    /**
629
    /**
630
     * Test the evidence of prior learning  deleted event.
630
     * Test the evidence of prior learning  deleted event.
631
     *
631
     *
632
     */
632
     */
633
    public function test_user_evidence_deleted() {
633
    public function test_user_evidence_deleted(): void {
634
        $this->resetAfterTest(true);
634
        $this->resetAfterTest(true);
635
        $this->setAdminUser();
635
        $this->setAdminUser();
636
        $dg = $this->getDataGenerator();
636
        $dg = $this->getDataGenerator();
Línea 657... Línea 657...
657
 
657
 
658
    /**
658
    /**
659
     * Test the evidence of prior learning  updated event.
659
     * Test the evidence of prior learning  updated event.
660
     *
660
     *
661
     */
661
     */
662
    public function test_user_evidence_updated() {
662
    public function test_user_evidence_updated(): void {
663
        $this->resetAfterTest(true);
663
        $this->resetAfterTest(true);
664
        $this->setAdminUser();
664
        $this->setAdminUser();
665
        $dg = $this->getDataGenerator();
665
        $dg = $this->getDataGenerator();
Línea 687... Línea 687...
687
 
687
 
688
    /**
688
    /**
689
     * Test the user competency viewed event in plan.
689
     * Test the user competency viewed event in plan.
690
     *
690
     *
691
     */
691
     */
692
    public function test_user_competency_viewed_in_plan() {
692
    public function test_user_competency_viewed_in_plan(): void {
693
        $this->resetAfterTest(true);
693
        $this->resetAfterTest(true);
694
        $this->setAdminUser();
694
        $this->setAdminUser();
695
        $dg = $this->getDataGenerator();
695
        $dg = $this->getDataGenerator();
696
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
696
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 769... Línea 769...
769
 
769
 
770
    /**
770
    /**
771
     * Test the user competency viewed event in course.
771
     * Test the user competency viewed event in course.
772
     *
772
     *
773
     */
773
     */
774
    public function test_user_competency_viewed_in_course() {
774
    public function test_user_competency_viewed_in_course(): void {
775
        $this->resetAfterTest(true);
775
        $this->resetAfterTest(true);
776
        $this->setAdminUser();
776
        $this->setAdminUser();
777
        $dg = $this->getDataGenerator();
777
        $dg = $this->getDataGenerator();
778
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
778
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 831... Línea 831...
831
 
831
 
832
    /**
832
    /**
833
     * Test the user competency plan viewed event.
833
     * Test the user competency plan viewed event.
834
     *
834
     *
835
     */
835
     */
836
    public function test_user_competency_plan_viewed() {
836
    public function test_user_competency_plan_viewed(): void {
837
        $this->resetAfterTest(true);
837
        $this->resetAfterTest(true);
838
        $this->setAdminUser();
838
        $this->setAdminUser();
839
        $dg = $this->getDataGenerator();
839
        $dg = $this->getDataGenerator();
840
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
840
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 916... Línea 916...
916
 
916
 
917
    /**
917
    /**
918
     * Test the user competency viewed event.
918
     * Test the user competency viewed event.
919
     *
919
     *
920
     */
920
     */
921
    public function test_user_competency_viewed() {
921
    public function test_user_competency_viewed(): void {
922
        $this->resetAfterTest(true);
922
        $this->resetAfterTest(true);
923
        $this->setAdminUser();
923
        $this->setAdminUser();
924
        $dg = $this->getDataGenerator();
924
        $dg = $this->getDataGenerator();
925
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
925
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 966... Línea 966...
966
 
966
 
967
    /**
967
    /**
968
     * Test the plan approved event.
968
     * Test the plan approved event.
969
     *
969
     *
970
     */
970
     */
971
    public function test_plan_approved() {
971
    public function test_plan_approved(): void {
972
        $this->resetAfterTest(true);
972
        $this->resetAfterTest(true);
973
        $this->setAdminUser();
973
        $this->setAdminUser();
974
        $dg = $this->getDataGenerator();
974
        $dg = $this->getDataGenerator();
975
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
975
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 994... Línea 994...
994
 
994
 
995
    /**
995
    /**
996
     * Test the plan unapproved event.
996
     * Test the plan unapproved event.
997
     *
997
     *
998
     */
998
     */
999
    public function test_plan_unapproved() {
999
    public function test_plan_unapproved(): void {
1000
        $this->resetAfterTest(true);
1000
        $this->resetAfterTest(true);
1001
        $this->setAdminUser();
1001
        $this->setAdminUser();
1002
        $dg = $this->getDataGenerator();
1002
        $dg = $this->getDataGenerator();
1003
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1003
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1022... Línea 1022...
1022
 
1022
 
1023
    /**
1023
    /**
1024
     * Test the plan reopened event.
1024
     * Test the plan reopened event.
1025
     *
1025
     *
1026
     */
1026
     */
1027
    public function test_plan_reopened() {
1027
    public function test_plan_reopened(): void {
1028
        $this->resetAfterTest(true);
1028
        $this->resetAfterTest(true);
1029
        $this->setAdminUser();
1029
        $this->setAdminUser();
1030
        $dg = $this->getDataGenerator();
1030
        $dg = $this->getDataGenerator();
1031
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1031
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1050... Línea 1050...
1050
 
1050
 
1051
    /**
1051
    /**
1052
     * Test the plan completed event.
1052
     * Test the plan completed event.
1053
     *
1053
     *
1054
     */
1054
     */
1055
    public function test_plan_completed() {
1055
    public function test_plan_completed(): void {
1056
        $this->resetAfterTest(true);
1056
        $this->resetAfterTest(true);
1057
        $this->setAdminUser();
1057
        $this->setAdminUser();
1058
        $dg = $this->getDataGenerator();
1058
        $dg = $this->getDataGenerator();
1059
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1059
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1078... Línea 1078...
1078
 
1078
 
1079
    /**
1079
    /**
1080
     * Test the plan unlinked event.
1080
     * Test the plan unlinked event.
1081
     *
1081
     *
1082
     */
1082
     */
1083
    public function test_plan_unlinked() {
1083
    public function test_plan_unlinked(): void {
1084
        $this->resetAfterTest(true);
1084
        $this->resetAfterTest(true);
1085
        $this->setAdminUser();
1085
        $this->setAdminUser();
1086
        $dg = $this->getDataGenerator();
1086
        $dg = $this->getDataGenerator();
1087
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1087
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1111... Línea 1111...
1111
 
1111
 
1112
    /**
1112
    /**
1113
     * Test the plan review requested event.
1113
     * Test the plan review requested event.
1114
     *
1114
     *
1115
     */
1115
     */
1116
    public function test_plan_review_requested() {
1116
    public function test_plan_review_requested(): void {
1117
        $this->resetAfterTest(true);
1117
        $this->resetAfterTest(true);
1118
        $this->setAdminUser();
1118
        $this->setAdminUser();
1119
        $dg = $this->getDataGenerator();
1119
        $dg = $this->getDataGenerator();
1120
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1120
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1139... Línea 1139...
1139
 
1139
 
1140
    /**
1140
    /**
1141
     * Test the plan review request cancelled event.
1141
     * Test the plan review request cancelled event.
1142
     *
1142
     *
1143
     */
1143
     */
1144
    public function test_plan_review_request_cancelled() {
1144
    public function test_plan_review_request_cancelled(): void {
1145
        $this->resetAfterTest(true);
1145
        $this->resetAfterTest(true);
1146
        $this->setAdminUser();
1146
        $this->setAdminUser();
1147
        $dg = $this->getDataGenerator();
1147
        $dg = $this->getDataGenerator();
1148
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1148
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1167... Línea 1167...
1167
 
1167
 
1168
    /**
1168
    /**
1169
     * Test the plan review started event.
1169
     * Test the plan review started event.
1170
     *
1170
     *
1171
     */
1171
     */
1172
    public function test_plan_review_started() {
1172
    public function test_plan_review_started(): void {
1173
        $this->resetAfterTest(true);
1173
        $this->resetAfterTest(true);
1174
        $this->setAdminUser();
1174
        $this->setAdminUser();
1175
        $dg = $this->getDataGenerator();
1175
        $dg = $this->getDataGenerator();
1176
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1176
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1195... Línea 1195...
1195
 
1195
 
1196
    /**
1196
    /**
1197
     * Test the plan review stopped event.
1197
     * Test the plan review stopped event.
1198
     *
1198
     *
1199
     */
1199
     */
1200
    public function test_plan_review_stopped() {
1200
    public function test_plan_review_stopped(): void {
1201
        $this->resetAfterTest(true);
1201
        $this->resetAfterTest(true);
1202
        $this->setAdminUser();
1202
        $this->setAdminUser();
1203
        $dg = $this->getDataGenerator();
1203
        $dg = $this->getDataGenerator();
1204
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1204
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1222... Línea 1222...
1222
    }
1222
    }
Línea 1223... Línea 1223...
1223
 
1223
 
1224
    /**
1224
    /**
1225
     * Test plan comment created event.
1225
     * Test plan comment created event.
1226
     */
1226
     */
1227
    public function test_plan_comment_created() {
1227
    public function test_plan_comment_created(): void {
1228
        $this->resetAfterTest(true);
1228
        $this->resetAfterTest(true);
1229
        $dg = $this->getDataGenerator();
1229
        $dg = $this->getDataGenerator();
1230
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1230
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1231
        $user = $dg->create_user();
1231
        $user = $dg->create_user();
Línea 1259... Línea 1259...
1259
    }
1259
    }
Línea 1260... Línea 1260...
1260
 
1260
 
1261
    /**
1261
    /**
1262
     * Test plan comment deleted event.
1262
     * Test plan comment deleted event.
1263
     */
1263
     */
1264
    public function test_plan_comment_deleted() {
1264
    public function test_plan_comment_deleted(): void {
1265
        $this->resetAfterTest(true);
1265
        $this->resetAfterTest(true);
1266
        $this->setAdminUser();
1266
        $this->setAdminUser();
1267
        $dg = $this->getDataGenerator();
1267
        $dg = $this->getDataGenerator();
1268
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1268
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1295... Línea 1295...
1295
    }
1295
    }
Línea 1296... Línea 1296...
1296
 
1296
 
1297
    /**
1297
    /**
1298
     * Test evidence_created event.
1298
     * Test evidence_created event.
1299
     */
1299
     */
1300
    public function test_evidence_created() {
1300
    public function test_evidence_created(): void {
Línea 1301... Línea 1301...
1301
        global $USER;
1301
        global $USER;
1302
 
1302
 
1303
        $this->resetAfterTest(true);
1303
        $this->resetAfterTest(true);
Línea 1354... Línea 1354...
1354
    }
1354
    }
Línea 1355... Línea 1355...
1355
 
1355
 
1356
    /**
1356
    /**
1357
     * Test evidence_created event by linking an invalid user competency to an evidence.
1357
     * Test evidence_created event by linking an invalid user competency to an evidence.
1358
     */
1358
     */
1359
    public function test_evidence_created_with_invalid_user_competency() {
1359
    public function test_evidence_created_with_invalid_user_competency(): void {
1360
        $this->resetAfterTest(true);
1360
        $this->resetAfterTest(true);
1361
        $dg = $this->getDataGenerator();
1361
        $dg = $this->getDataGenerator();
Línea 1362... Línea 1362...
1362
        $syscontext = \context_system::instance();
1362
        $syscontext = \context_system::instance();
Línea 1388... Línea 1388...
1388
    /**
1388
    /**
1389
     * Test creation of evidence_created event with missing data.
1389
     * Test creation of evidence_created event with missing data.
1390
     *
1390
     *
1391
     * These data are validated by \core_competency\evidence_created::validate_data().
1391
     * These data are validated by \core_competency\evidence_created::validate_data().
1392
     */
1392
     */
1393
    public function test_evidence_created_with_missing_data() {
1393
    public function test_evidence_created_with_missing_data(): void {
1394
        $eventdata = [
1394
        $eventdata = [
1395
            'contextid'  => 1,
1395
            'contextid'  => 1,
1396
            'objectid' => 1,
1396
            'objectid' => 1,
1397
            'userid' => 1
1397
            'userid' => 1
1398
        ];
1398
        ];
Línea 1453... Línea 1453...
1453
 
1453
 
1454
    /**
1454
    /**
1455
     * Test the user competency grade rated event.
1455
     * Test the user competency grade rated event.
1456
     *
1456
     *
1457
     */
1457
     */
1458
    public function test_user_competency_rated() {
1458
    public function test_user_competency_rated(): void {
1459
        $this->resetAfterTest(true);
1459
        $this->resetAfterTest(true);
1460
        $this->setAdminUser();
1460
        $this->setAdminUser();
1461
        $dg = $this->getDataGenerator();
1461
        $dg = $this->getDataGenerator();
1462
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1462
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1502... Línea 1502...
1502
 
1502
 
1503
    /**
1503
    /**
1504
     * Test the user competency grade rated in course event.
1504
     * Test the user competency grade rated in course event.
1505
     *
1505
     *
1506
     */
1506
     */
1507
    public function test_user_competency_rated_in_course() {
1507
    public function test_user_competency_rated_in_course(): void {
1508
        $this->resetAfterTest(true);
1508
        $this->resetAfterTest(true);
1509
        $this->setAdminUser();
1509
        $this->setAdminUser();
1510
        $dg = $this->getDataGenerator();
1510
        $dg = $this->getDataGenerator();
1511
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1511
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1559... Línea 1559...
1559
 
1559
 
1560
    /**
1560
    /**
1561
     * Test the user competency grade rated in plan event.
1561
     * Test the user competency grade rated in plan event.
1562
     *
1562
     *
1563
     */
1563
     */
1564
    public function test_user_competency_rated_in_plan() {
1564
    public function test_user_competency_rated_in_plan(): void {
1565
         $this->resetAfterTest(true);
1565
         $this->resetAfterTest(true);
1566
        $this->setAdminUser();
1566
        $this->setAdminUser();
1567
        $dg = $this->getDataGenerator();
1567
        $dg = $this->getDataGenerator();
1568
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1568
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
Línea 1609... Línea 1609...
1609
    }
1609
    }
Línea 1610... Línea 1610...
1610
 
1610
 
1611
    /**
1611
    /**
1612
     * Test user competency comment created event.
1612
     * Test user competency comment created event.
1613
     */
1613
     */
1614
    public function test_user_competency_comment_created() {
1614
    public function test_user_competency_comment_created(): void {
Línea 1615... Línea 1615...
1615
        $this->resetAfterTest(true);
1615
        $this->resetAfterTest(true);
1616
 
1616
 
1617
        $dg = $this->getDataGenerator();
1617
        $dg = $this->getDataGenerator();
Línea 1651... Línea 1651...
1651
    }
1651
    }
Línea 1652... Línea 1652...
1652
 
1652
 
1653
    /**
1653
    /**
1654
     * Test plan comment deleted event.
1654
     * Test plan comment deleted event.
1655
     */
1655
     */
1656
    public function test_user_competency_comment_deleted() {
1656
    public function test_user_competency_comment_deleted(): void {
1657
        $this->resetAfterTest(true);
1657
        $this->resetAfterTest(true);
1658
        $this->setAdminUser();
1658
        $this->setAdminUser();
1659
        $dg = $this->getDataGenerator();
1659
        $dg = $this->getDataGenerator();
1660
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');
1660
        $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');