Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 14... Línea 14...
14
// You should have received a copy of the GNU General Public License
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
Línea 16... Línea 16...
16
 
16
 
Línea -... Línea 17...
-
 
17
namespace core\task;
-
 
18
 
17
namespace core\task;
19
use core\url;
18
 
20
 
19
/**
21
/**
20
 * Test class for adhoc tasks.
22
 * Test class for adhoc tasks.
21
 *
23
 *
Línea 56... Línea 58...
56
     * Test basic adhoc task execution.
58
     * Test basic adhoc task execution.
57
     */
59
     */
58
    public function test_get_next_adhoc_task_now(): void {
60
    public function test_get_next_adhoc_task_now(): void {
59
        $this->resetAfterTest(true);
61
        $this->resetAfterTest(true);
Línea -... Línea 62...
-
 
62
 
-
 
63
        $clock = $this->mock_clock_with_frozen();
60
 
64
 
61
        // Create an adhoc task.
65
        // Create an adhoc task.
Línea 62... Línea 66...
62
        $task = new adhoc_test_task();
66
        $task = new adhoc_test_task();
63
 
67
 
Línea 64... Línea -...
64
        // Queue it.
-
 
65
        manager::queue_adhoc_task($task);
68
        // Queue it.
66
 
69
        manager::queue_adhoc_task($task);
67
        $now = time();
70
 
68
        // Get it from the scheduler.
71
        // Get it from the scheduler.
69
        $task = manager::get_next_adhoc_task($now);
72
        $task = manager::get_next_adhoc_task($clock->time());
70
        $this->assertInstanceOf('\\core\\task\\adhoc_test_task', $task);
73
        $this->assertInstanceOf('\\core\\task\\adhoc_test_task', $task);
Línea 76... Línea 79...
76
     * Test basic adhoc task execution.
79
     * Test basic adhoc task execution.
77
     */
80
     */
78
    public function test_get_next_adhoc_task_class(): void {
81
    public function test_get_next_adhoc_task_class(): void {
79
        $this->resetAfterTest(true);
82
        $this->resetAfterTest(true);
Línea -... Línea 83...
-
 
83
 
-
 
84
        $clock = $this->mock_clock_with_frozen();
80
 
85
 
81
        // Create an adhoc task.
86
        // Create an adhoc task.
Línea 82... Línea 87...
82
        $task = new \core\task\adhoc_test_task();
87
        $task = new \core\task\adhoc_test_task();
83
 
88
 
Línea 84... Línea -...
84
        // Queue it.
-
 
85
        manager::queue_adhoc_task($task);
89
        // Queue it.
Línea 86... Línea 90...
86
 
90
        manager::queue_adhoc_task($task);
87
        $now = time();
91
 
Línea 88... Línea 92...
88
        $classname = get_class($task);
92
        $classname = get_class($task);
89
 
93
 
90
        // The task will not be returned.
94
        // The task will not be returned.
91
        $this->assertNull(manager::get_next_adhoc_task($now, true, "{$classname}notexists"));
95
        $this->assertNull(manager::get_next_adhoc_task($clock->time(), true, "{$classname}notexists"));
92
 
96
 
93
        // Get it from the scheduler.
97
        // Get it from the scheduler.
Línea 101... Línea 105...
101
     * Test adhoc task failure retry backoff.
105
     * Test adhoc task failure retry backoff.
102
     */
106
     */
103
    public function test_get_next_adhoc_task_fail_retry(): void {
107
    public function test_get_next_adhoc_task_fail_retry(): void {
104
        $this->resetAfterTest(true);
108
        $this->resetAfterTest(true);
Línea -... Línea 109...
-
 
109
 
-
 
110
        $clock = $this->mock_clock_with_frozen();
105
 
111
 
106
        // Create an adhoc task.
112
        // Create an adhoc task.
107
        $task = new adhoc_test_task();
113
        $task = new adhoc_test_task();
Línea 108... Línea 114...
108
        manager::queue_adhoc_task($task);
114
        manager::queue_adhoc_task($task);
Línea 109... Línea 115...
109
 
115
 
110
        $now = time();
116
        $now = $clock->time();
111
 
117
 
112
        // Get it from the scheduler, execute it, and mark it as failed.
118
        // Get it from the scheduler, execute it, and mark it as failed.
Línea 117... Línea 123...
117
 
123
 
118
        // The task will not be returned immediately.
124
        // The task will not be returned immediately.
Línea 119... Línea 125...
119
        $this->assertNull(manager::get_next_adhoc_task($now));
125
        $this->assertNull(manager::get_next_adhoc_task($now));
-
 
126
 
120
 
127
        // Should get the adhoc task (retry after delay). Fail it again.
121
        // Should get the adhoc task (retry after delay). Fail it again.
128
        $clock->bump(120);
122
        $task = manager::get_next_adhoc_task($now + 120);
129
        $task = manager::get_next_adhoc_task($clock->time());
123
        $this->assertInstanceOf('\\core\\task\\adhoc_test_task', $task);
130
        $this->assertInstanceOf('\\core\\task\\adhoc_test_task', $task);
124
        $this->assertEquals($taskid, $task->get_id());
131
        $this->assertEquals($taskid, $task->get_id());
Línea 142... Línea 149...
142
     * @covers \core\task\adhoc_task
149
     * @covers \core\task\adhoc_task
143
     */
150
     */
144
    public function test_get_next_adhoc_task_maximum_fail_delay(): void {
151
    public function test_get_next_adhoc_task_maximum_fail_delay(): void {
145
        $this->resetAfterTest(true);
152
        $this->resetAfterTest(true);
Línea -... Línea 153...
-
 
153
 
146
 
154
        $clock = $this->mock_clock_with_frozen();
Línea 147... Línea 155...
147
        $now = time();
155
        $now = $clock->time();
148
 
156
 
149
        // Create an adhoc task.
157
        // Create an adhoc task.
150
        $task = new adhoc_test_task();
158
        $task = new adhoc_test_task();
Línea 167... Línea 175...
167
     */
175
     */
168
    public function test_adhoc_task_with_retry_flag(): void {
176
    public function test_adhoc_task_with_retry_flag(): void {
169
        global $DB;
177
        global $DB;
170
        $this->resetAfterTest();
178
        $this->resetAfterTest();
Línea -... Línea 179...
-
 
179
 
-
 
180
        $clock = $this->mock_clock_with_frozen();
171
 
181
 
172
        $now = time();
182
        $now = $clock->time();
173
        // Create a normal adhoc task.
183
        // Create a normal adhoc task.
174
        $task = new adhoc_test_task();
184
        $task = new adhoc_test_task();
Línea 175... Línea 185...
175
        $taskid1 = manager::queue_adhoc_task(task: $task);
185
        $taskid1 = manager::queue_adhoc_task(task: $task);
Línea 195... Línea 205...
195
            conditions: ['id' => $taskid1]
205
            conditions: ['id' => $taskid1]
196
        );
206
        );
197
        $this->assertEquals(expected: 12 - 1, actual: $attemptsavailable);
207
        $this->assertEquals(expected: 12 - 1, actual: $attemptsavailable);
Línea 198... Línea 208...
198
 
208
 
199
        // Create a no-retry adhoc task.
209
        // Create a no-retry adhoc task.
200
        $now = time();
210
        $now = $clock->time();
201
        $task = new no_retry_adhoc_task();
211
        $task = new no_retry_adhoc_task();
Línea 202... Línea 212...
202
        $taskid2 = manager::queue_adhoc_task(task: $task);
212
        $taskid2 = manager::queue_adhoc_task(task: $task);
203
 
213
 
Línea 266... Línea 276...
266
     */
276
     */
267
    public function test_adhoc_task_clean_up(): void {
277
    public function test_adhoc_task_clean_up(): void {
268
        global $DB, $CFG;
278
        global $DB, $CFG;
269
        $this->resetAfterTest();
279
        $this->resetAfterTest();
Línea -... Línea 280...
-
 
280
 
-
 
281
        $clock = $this->mock_clock_with_frozen();
270
 
282
 
271
        // Create two no-retry adhoc tasks.
283
        // Create two no-retry adhoc tasks.
272
        $task1 = new no_retry_adhoc_task();
284
        $task1 = new no_retry_adhoc_task();
273
        $taskid1 = manager::queue_adhoc_task(task: $task1);
285
        $taskid1 = manager::queue_adhoc_task(task: $task1);
274
        $task2 = new no_retry_adhoc_task();
286
        $task2 = new no_retry_adhoc_task();
Línea 315... Línea 327...
315
 
327
 
316
        // Update the time of the task2 to be older more than 2 days.
328
        // Update the time of the task2 to be older more than 2 days.
317
        $DB->set_field(
329
        $DB->set_field(
318
            table: 'task_adhoc',
330
            table: 'task_adhoc',
319
            newfield: 'firststartingtime',
331
            newfield: 'firststartingtime',
320
            newvalue: time() - (DAYSECS * 2) - 10, // Plus 10 seconds to make sure it is older than 2 days.
332
            newvalue: $clock->time() - (DAYSECS * 2) - 10, // Plus 10 seconds to make sure it is older than 2 days.
321
            conditions: ['id' => $taskid2],
333
            conditions: ['id' => $taskid2],
Línea 322... Línea 334...
322
        );
334
        );
323
 
335
 
Línea 333... Línea 345...
333
        // Update the time of the task1 to be older than the cleanup time.
345
        // Update the time of the task1 to be older than the cleanup time.
334
        $DB->set_field(
346
        $DB->set_field(
335
            table: 'task_adhoc',
347
            table: 'task_adhoc',
336
            newfield: 'firststartingtime',
348
            newfield: 'firststartingtime',
337
            // Plus 10 seconds to make sure it is older than the retention time.
349
            // Plus 10 seconds to make sure it is older than the retention time.
338
            newvalue: time() - $CFG->task_adhoc_failed_retention - 10,
350
            newvalue: $clock->time() - $CFG->task_adhoc_failed_retention - 10,
339
            conditions: ['id' => $taskid1],
351
            conditions: ['id' => $taskid1],
340
        );
352
        );
Línea 341... Línea 353...
341
 
353
 
342
        // Clean up failed adhoc tasks. task1 should be cleaned now.
354
        // Clean up failed adhoc tasks. task1 should be cleaned now.
Línea 366... Línea 378...
366
     */
378
     */
367
    public function test_adhoc_task_failed_will_retain_time_info(): void {
379
    public function test_adhoc_task_failed_will_retain_time_info(): void {
368
        global $DB;
380
        global $DB;
369
        $this->resetAfterTest();
381
        $this->resetAfterTest();
Línea -... Línea 382...
-
 
382
 
370
 
383
        $clock = $this->mock_clock_with_frozen();
-
 
384
        $now = $clock->time();
371
        $now = time();
385
 
372
        // Create an adhoc task.
386
        // Create an adhoc task.
373
        $task = new adhoc_test_task();
387
        $task = new adhoc_test_task();
374
        // Queue it.
388
        // Queue it.
Línea 375... Línea 389...
375
        $taskid = manager::queue_adhoc_task(task: $task);
389
        $taskid = manager::queue_adhoc_task(task: $task);
376
 
390
 
377
        // Update the timecreated of the task to be older.
391
        // Update the timecreated of the task to be older.
378
        $DB->set_field(
392
        $DB->set_field(
379
            table: 'task_adhoc',
393
            table: 'task_adhoc',
380
            newfield: 'timecreated',
394
            newfield: 'timecreated',
381
            newvalue: time() - DAYSECS,
395
            newvalue: $clock->time() - DAYSECS,
Línea 382... Línea 396...
382
            conditions: ['id' => $taskid],
396
            conditions: ['id' => $taskid],
383
        );
397
        );
Línea 411... Línea 425...
411
     * Test future adhoc task execution.
425
     * Test future adhoc task execution.
412
     */
426
     */
413
    public function test_get_next_adhoc_task_future(): void {
427
    public function test_get_next_adhoc_task_future(): void {
414
        $this->resetAfterTest(true);
428
        $this->resetAfterTest(true);
Línea -... Línea 429...
-
 
429
 
415
 
430
        $clock = $this->mock_clock_with_frozen();
-
 
431
        $now = $clock->time();
416
        $now = time();
432
 
417
        // Create an adhoc task in future.
433
        // Create an adhoc task in future.
418
        $task = new adhoc_test_task();
434
        $task = new adhoc_test_task();
419
        $task->set_next_run_time($now + 1000);
435
        $task->set_next_run_time($now + 1000);
Línea 464... Línea 480...
464
        $this->resetAfterTest();
480
        $this->resetAfterTest();
Línea 465... Línea 481...
465
 
481
 
Línea 466... Línea 482...
466
        $task = new \mod_fake\task\adhoc_component_task();
482
        $task = new \mod_fake\task\adhoc_component_task();
-
 
483
 
-
 
484
        manager::queue_adhoc_task($task);
467
 
485
        $this->assertdebuggingcalledcount(
-
 
486
            2,
468
        manager::queue_adhoc_task($task);
487
            array_fill(0, 2, 'Component not set and the class namespace does not match a valid component (mod_fake).'),
Línea 469... Línea 488...
469
        $this->assertDebuggingCalled('Component not set and the class namespace does not match a valid component (mod_fake).');
488
        );
470
    }
489
    }
471
 
490
 
Línea 569... Línea 588...
569
     * specified.
588
     * specified.
570
     */
589
     */
571
    public function test_reschedule_or_queue_adhoc_task_match_no_change(): void {
590
    public function test_reschedule_or_queue_adhoc_task_match_no_change(): void {
572
        $this->resetAfterTest(true);
591
        $this->resetAfterTest(true);
Línea -... Línea 592...
-
 
592
 
-
 
593
        $clock = $this->mock_clock_with_frozen();
573
 
594
 
574
        // Schedule adhoc task.
595
        // Schedule adhoc task.
575
        $task = new adhoc_test_task();
596
        $task = new adhoc_test_task();
576
        $task->set_custom_data(['courseid' => 10]);
597
        $task->set_custom_data(['courseid' => 10]);
577
        $task->set_next_run_time(time() + DAYSECS);
598
        $task->set_next_run_time($clock->time() + DAYSECS);
Línea 578... Línea 599...
578
        manager::reschedule_or_queue_adhoc_task($task);
599
        manager::reschedule_or_queue_adhoc_task($task);
Línea 579... Línea 600...
579
 
600
 
Línea 591... Línea 612...
591
    /**
612
    /**
592
     * Ensure that the reschedule_or_queue_adhoc_task function will update the run time if there are planned changes.
613
     * Ensure that the reschedule_or_queue_adhoc_task function will update the run time if there are planned changes.
593
     */
614
     */
594
    public function test_reschedule_or_queue_adhoc_task_match_update_runtime(): void {
615
    public function test_reschedule_or_queue_adhoc_task_match_update_runtime(): void {
595
        $this->resetAfterTest(true);
616
        $this->resetAfterTest(true);
-
 
617
 
-
 
618
        $clock = $this->mock_clock_with_frozen();
-
 
619
 
596
        $initialruntime = time() + DAYSECS;
620
        $initialruntime = $clock->time() + DAYSECS;
597
        $newruntime = time() + WEEKSECS;
621
        $newruntime = $clock->time() + WEEKSECS;
Línea 598... Línea 622...
598
 
622
 
599
        // Schedule adhoc task.
623
        // Schedule adhoc task.
600
        $task = new adhoc_test_task();
624
        $task = new adhoc_test_task();
601
        $task->set_custom_data(['courseid' => 10]);
625
        $task->set_custom_data(['courseid' => 10]);
Línea 688... Línea 712...
688
     * @covers \core\task\adhoc_task
712
     * @covers \core\task\adhoc_task
689
     */
713
     */
690
    public function test_adhoc_task_user_empty(): void {
714
    public function test_adhoc_task_user_empty(): void {
691
        $this->resetAfterTest(true);
715
        $this->resetAfterTest(true);
Línea -... Línea 716...
-
 
716
 
-
 
717
        $clock = $this->mock_clock_with_frozen();
692
 
718
 
693
        // Create an adhoc task in future.
719
        // Create an adhoc task in future.
694
        $task = new adhoc_test_task();
720
        $task = new adhoc_test_task();
Línea 695... Línea 721...
695
        manager::queue_adhoc_task($task);
721
        manager::queue_adhoc_task($task);
696
 
722
 
697
        // Get it back from the scheduler.
723
        // Get it back from the scheduler.
698
        $now = time();
724
        $now = $clock->time();
Línea 699... Línea 725...
699
        $task = manager::get_next_adhoc_task($now);
725
        $task = manager::get_next_adhoc_task($now);
700
        manager::adhoc_task_complete($task);
726
        manager::adhoc_task_complete($task);
Línea 716... Línea 742...
716
        $user = \core_user::get_user_by_username('admin');
742
        $user = \core_user::get_user_by_username('admin');
717
        $task->set_userid($user->id);
743
        $task->set_userid($user->id);
718
        manager::queue_adhoc_task($task);
744
        manager::queue_adhoc_task($task);
Línea 719... Línea 745...
719
 
745
 
-
 
746
        // Get it back from the scheduler.
720
        // Get it back from the scheduler.
747
        $clock = $this->mock_clock_with_frozen();
721
        $now = time();
748
        $now = $clock->time();
722
        $task = manager::get_next_adhoc_task($now);
749
        $task = manager::get_next_adhoc_task($now);
Línea 723... Línea 750...
723
        manager::adhoc_task_complete($task);
750
        manager::adhoc_task_complete($task);
724
 
751
 
Línea 730... Línea 757...
730
     */
757
     */
731
    public function test_adhoc_task_get_first_starting_time(): void {
758
    public function test_adhoc_task_get_first_starting_time(): void {
732
        global $DB;
759
        global $DB;
733
        $this->resetAfterTest(true);
760
        $this->resetAfterTest(true);
Línea -... Línea 761...
-
 
761
 
734
 
762
        $clock = $this->mock_clock_with_frozen();
Línea 735... Línea 763...
735
        $now = time();
763
        $now = $clock->time();
736
 
764
 
737
        // Create an adhoc task.
765
        // Create an adhoc task.
738
        $task = new adhoc_test_task();
766
        $task = new adhoc_test_task();
Línea 746... Línea 774...
746
            conditions: ['id' => $taskid],
774
            conditions: ['id' => $taskid],
747
        );
775
        );
748
        $this->assertNull($firststartingtime);
776
        $this->assertNull($firststartingtime);
Línea 749... Línea 777...
749
 
777
 
750
        // This will make sure that the task will be started after the $now value.
778
        // This will make sure that the task will be started after the $now value.
Línea 751... Línea 779...
751
        sleep(3);
779
        $clock->bump(5);
752
 
780
 
753
        // Get the task from the scheduler.
781
        // Get the task from the scheduler.
754
        $task = manager::get_next_adhoc_task(timestart: $now);
782
        $task = manager::get_next_adhoc_task(timestart: $now);
Línea 766... Línea 794...
766
            conditions: ['id' => $taskid],
794
            conditions: ['id' => $taskid],
767
        );
795
        );
768
        $this->assertNotNull($origintimestarted);
796
        $this->assertNotNull($origintimestarted);
769
        $this->assertGreaterThan($now, $origintimestarted);
797
        $this->assertGreaterThan($now, $origintimestarted);
Línea -... Línea 798...
-
 
798
 
-
 
799
        // Time travel 24 hours into the future.
-
 
800
        $clock->bump(DAYSECS * 3);
770
 
801
        $now = $clock->time();
771
        // Get the task from the scheduler.
802
        // Get the task from the scheduler.
772
        $task = manager::get_next_adhoc_task(timestart: $now + 86400);
803
        $task = manager::get_next_adhoc_task(timestart: $now);
773
        // Mark the task as starting.
804
        // Mark the task as starting.
774
        manager::adhoc_task_starting($task);
805
        manager::adhoc_task_starting($task);
775
        // Execute the task.
806
        // Execute the task.
776
        $task->execute();
807
        $task->execute();
Línea 830... Línea 861...
830
     * Test adhoc task sorting.
861
     * Test adhoc task sorting.
831
     */
862
     */
832
    public function test_get_next_adhoc_task_sorting(): void {
863
    public function test_get_next_adhoc_task_sorting(): void {
833
        $this->resetAfterTest(true);
864
        $this->resetAfterTest(true);
Línea -... Línea 865...
-
 
865
 
-
 
866
        $clock = $this->mock_clock_with_frozen();
834
 
867
 
835
        // Create adhoc tasks.
868
        // Create adhoc tasks.
836
        $task1 = new adhoc_test_task();
869
        $task1 = new adhoc_test_task();
837
        $task1->set_next_run_time(1510000000);
870
        $task1->set_next_run_time(1510000000);
838
        $task1->set_custom_data_as_string('Task 1');
871
        $task1->set_custom_data_as_string('Task 1');
Línea 857... Línea 890...
857
 
890
 
858
        $task2->set_next_run_time(1530000000);
891
        $task2->set_next_run_time(1530000000);
Línea 859... Línea 892...
859
        manager::reschedule_or_queue_adhoc_task($task2);
892
        manager::reschedule_or_queue_adhoc_task($task2);
860
 
893
 
861
        // Confirm, that tasks are sorted by nextruntime and then by id (ascending).
894
        // Confirm, that tasks are sorted by nextruntime and then by id (ascending).
862
        $task = manager::get_next_adhoc_task(time());
895
        $task = manager::get_next_adhoc_task($clock->time());
Línea 863... Línea 896...
863
        $this->assertEquals('Task 2', $task->get_custom_data_as_string());
896
        $this->assertEquals('Task 2', $task->get_custom_data_as_string());
864
        manager::adhoc_task_complete($task);
897
        manager::adhoc_task_complete($task);
865
 
898
 
Línea 866... Línea 899...
866
        $task = manager::get_next_adhoc_task(time());
899
        $task = manager::get_next_adhoc_task($clock->time());
867
        $this->assertEquals('Task 3', $task->get_custom_data_as_string());
900
        $this->assertEquals('Task 3', $task->get_custom_data_as_string());
868
        manager::adhoc_task_complete($task);
901
        manager::adhoc_task_complete($task);
869
 
902
 
Línea 870... Línea 903...
870
        $task = manager::get_next_adhoc_task(time());
903
        $task = manager::get_next_adhoc_task($clock->time());
Línea 919... Línea 952...
919
    }
952
    }
Línea 920... Línea 953...
920
 
953
 
921
    /**
954
    /**
922
     * Test send messages when adhoc task reaches the max fail delay time.
955
     * Test send messages when adhoc task reaches the max fail delay time.
923
     *
-
 
924
     * @covers ::adhoc_task_failed
956
     *
925
     * @covers ::send_failed_task_max_delay_message
957
     * @covers \core\task\failed_task_callbacks::send_failed_task_max_delay_message
926
     */
958
     */
927
    public function test_adhoc_message_max_fail_delay(): void {
959
    public function test_adhoc_message_max_fail_delay(): void {
928
        $this->resetAfterTest();
960
        $this->resetAfterTest();
Línea -... Línea 961...
-
 
961
        $this->setAdminUser();
-
 
962
 
929
        $this->setAdminUser();
963
        $clock = $this->mock_clock_with_frozen();
930
 
964
 
Línea 931... Línea 965...
931
        // Redirect messages.
965
        // Redirect messages.
932
        $messagesink = $this->redirectMessages();
966
        $messagesink = $this->redirectMessages();
933
 
967
 
Línea 934... Línea 968...
934
        // Create an adhoc task.
968
        // Create an adhoc task.
Línea 935... Línea 969...
935
        $task = new adhoc_test_task();
969
        $task = new adhoc_test_task();
936
        manager::queue_adhoc_task($task);
970
        manager::queue_adhoc_task($task);
937
 
971
 
938
        $now = time();
972
        $now = $clock->time();
Línea 984... Línea 1018...
984
        // Check first message information.
1018
        // Check first message information.
985
        $this->assertStringContainsString('Task failed: Test adhoc class', $messages[0]->subject);
1019
        $this->assertStringContainsString('Task failed: Test adhoc class', $messages[0]->subject);
986
        $this->assertEquals('failedtaskmaxdelay', $messages[0]->eventtype);
1020
        $this->assertEquals('failedtaskmaxdelay', $messages[0]->eventtype);
987
        $this->assertEquals('-10', $messages[0]->useridfrom);
1021
        $this->assertEquals('-10', $messages[0]->useridfrom);
988
        $this->assertEquals('2', $messages[0]->useridto);
1022
        $this->assertEquals('2', $messages[0]->useridto);
-
 
1023
        $this->assertEquals('Task logs', $messages[0]->contexturlname);
-
 
1024
        $this->assertEquals(
-
 
1025
            (new url('/admin/tasklogs.php', ['filter' => get_class($task)]))->out(false),
-
 
1026
            $messages[0]->contexturl,
-
 
1027
        );
Línea 989... Línea 1028...
989
 
1028
 
990
        // Close sink.
1029
        // Close sink.
991
        $messagesink->close();
1030
        $messagesink->close();
992
    }
1031
    }