Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 51... Línea 51...
51
    }
51
    }
Línea 52... Línea 52...
52
 
52
 
53
    /**
53
    /**
54
     * Ensure that store_log_for_task works with a passing scheduled task.
54
     * Ensure that store_log_for_task works with a passing scheduled task.
55
     */
55
     */
56
    public function test_store_log_for_task_scheduled() {
56
    public function test_store_log_for_task_scheduled(): void {
Línea 57... Línea 57...
57
        global $DB;
57
        global $DB;
Línea 58... Línea 58...
58
 
58
 
Línea 80... Línea 80...
80
    }
80
    }
Línea 81... Línea 81...
81
 
81
 
82
    /**
82
    /**
83
     * Ensure that store_log_for_task works with a passing adhoc task.
83
     * Ensure that store_log_for_task works with a passing adhoc task.
84
     */
84
     */
85
    public function test_store_log_for_task_adhoc() {
85
    public function test_store_log_for_task_adhoc(): void {
Línea 86... Línea 86...
86
        global $DB;
86
        global $DB;
Línea 87... Línea 87...
87
 
87
 
Línea 112... Línea 112...
112
    }
112
    }
Línea 113... Línea 113...
113
 
113
 
114
    /**
114
    /**
115
     * Ensure that store_log_for_task works with a failing scheduled task.
115
     * Ensure that store_log_for_task works with a failing scheduled task.
116
     */
116
     */
117
    public function test_store_log_for_task_failed_scheduled() {
117
    public function test_store_log_for_task_failed_scheduled(): void {
Línea 118... Línea 118...
118
        global $DB;
118
        global $DB;
Línea 119... Línea 119...
119
 
119
 
Línea 141... Línea 141...
141
    }
141
    }
Línea 142... Línea 142...
142
 
142
 
143
    /**
143
    /**
144
     * Ensure that store_log_for_task works with a failing adhoc task.
144
     * Ensure that store_log_for_task works with a failing adhoc task.
145
     */
145
     */
146
    public function test_store_log_for_task_failed_adhoc() {
146
    public function test_store_log_for_task_failed_adhoc(): void {
Línea 147... Línea 147...
147
        global $DB;
147
        global $DB;
Línea 148... Línea 148...
148
 
148
 
Línea 173... Línea 173...
173
        $this->assertEquals(0, $log->userid);
173
        $this->assertEquals(0, $log->userid);
174
    }
174
    }
175
    /**
175
    /**
176
     * Ensure that store_log_for_task works with a passing adhoc task run as a specific user.
176
     * Ensure that store_log_for_task works with a passing adhoc task run as a specific user.
177
     */
177
     */
178
    public function test_store_log_for_task_adhoc_userid() {
178
    public function test_store_log_for_task_adhoc_userid(): void {
179
        global $DB;
179
        global $DB;
Línea 180... Línea 180...
180
 
180
 
Línea 181... Línea 181...
181
        $this->resetAfterTest();
181
        $this->resetAfterTest();
Línea 210... Línea 210...
210
     * Ensure that the delete_task_logs function performs necessary deletion tasks.
210
     * Ensure that the delete_task_logs function performs necessary deletion tasks.
211
     *
211
     *
212
     * @dataProvider    delete_task_logs_provider
212
     * @dataProvider    delete_task_logs_provider
213
     * @param   mixed   $ids
213
     * @param   mixed   $ids
214
     */
214
     */
215
    public function test_delete_task_logs($ids) {
215
    public function test_delete_task_logs($ids): void {
216
        $DB = $this->mock_database();
216
        $DB = $this->mock_database();
217
        $DB->expects($this->once())
217
        $DB->expects($this->once())
218
            ->method('delete_records_list')
218
            ->method('delete_records_list')
219
            ->with(
219
            ->with(
220
                $this->equalTo('task_log'),
220
                $this->equalTo('task_log'),
Línea 247... Línea 247...
247
    }
247
    }
Línea 248... Línea 248...
248
 
248
 
249
    /**
249
    /**
250
     * Ensure that the retention period applies correctly.
250
     * Ensure that the retention period applies correctly.
251
     */
251
     */
252
    public function test_cleanup_retention() {
252
    public function test_cleanup_retention(): void {
Línea 253... Línea 253...
253
        global $DB;
253
        global $DB;
Línea 254... Línea 254...
254
 
254
 
Línea 311... Línea 311...
311
    }
311
    }
Línea 312... Línea 312...
312
 
312
 
313
    /**
313
    /**
314
     * Ensure that the run-count retention applies.
314
     * Ensure that the run-count retention applies.
315
     */
315
     */
316
    public function test_cleanup_retainruns() {
316
    public function test_cleanup_retainruns(): void {
Línea 317... Línea 317...
317
        global $DB;
317
        global $DB;
Línea 318... Línea 318...
318
 
318
 
Línea 417... Línea 417...
417
    }
417
    }
Línea 418... Línea 418...
418
 
418
 
419
    /**
419
    /**
420
     * Ensure that the retention period applies correctly when combined with the run count retention.
420
     * Ensure that the retention period applies correctly when combined with the run count retention.
421
     */
421
     */
422
    public function test_cleanup_combined() {
422
    public function test_cleanup_combined(): void {
Línea 423... Línea 423...
423
        global $DB;
423
        global $DB;
Línea 424... Línea 424...
424
 
424