Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 59... Línea 59...
59
    }
59
    }
Línea 60... Línea 60...
60
 
60
 
61
    /**
61
    /**
62
     * When the logmode is set to none, logging should not start.
62
     * When the logmode is set to none, logging should not start.
63
     */
63
     */
64
    public function test_logmode_none() {
64
    public function test_logmode_none(): void {
65
        global $CFG;
65
        global $CFG;
Línea 66... Línea 66...
66
        $this->resetAfterTest();
66
        $this->resetAfterTest();
Línea 77... Línea 77...
77
    }
77
    }
Línea 78... Línea 78...
78
 
78
 
79
    /**
79
    /**
80
     * When the logmode is set to all that log capture is started.
80
     * When the logmode is set to all that log capture is started.
81
     */
81
     */
82
    public function test_start_logmode_all() {
82
    public function test_start_logmode_all(): void {
83
        global $CFG;
83
        global $CFG;
Línea 84... Línea 84...
84
        $this->resetAfterTest();
84
        $this->resetAfterTest();
Línea 98... Línea 98...
98
    }
98
    }
Línea 99... Línea 99...
99
 
99
 
100
    /**
100
    /**
101
     * When the logmode is set to fail that log capture is started.
101
     * When the logmode is set to fail that log capture is started.
102
     */
102
     */
103
    public function test_start_logmode_fail() {
103
    public function test_start_logmode_fail(): void {
104
        global $CFG;
104
        global $CFG;
Línea 105... Línea 105...
105
        $this->resetAfterTest();
105
        $this->resetAfterTest();
Línea 119... Línea 119...
119
    }
119
    }
Línea 120... Línea 120...
120
 
120
 
121
    /**
121
    /**
122
     * When the logmode is set to fail, passing adhoc tests should not be logged.
122
     * When the logmode is set to fail, passing adhoc tests should not be logged.
123
     */
123
     */
124
    public function test_logmode_fail_with_passing_adhoc_task() {
124
    public function test_logmode_fail_with_passing_adhoc_task(): void {
125
        global $CFG;
125
        global $CFG;
Línea 126... Línea 126...
126
        $this->resetAfterTest();
126
        $this->resetAfterTest();
Línea 140... Línea 140...
140
    }
140
    }
Línea 141... Línea 141...
141
 
141
 
142
    /**
142
    /**
143
     * When the logmode is set to fail, passing scheduled tests should not be logged.
143
     * When the logmode is set to fail, passing scheduled tests should not be logged.
144
     */
144
     */
145
    public function test_logmode_fail_with_passing_scheduled_task() {
145
    public function test_logmode_fail_with_passing_scheduled_task(): void {
146
        global $CFG;
146
        global $CFG;
Línea 147... Línea 147...
147
        $this->resetAfterTest();
147
        $this->resetAfterTest();
Línea 161... Línea 161...
161
    }
161
    }
Línea 162... Línea 162...
162
 
162
 
163
    /**
163
    /**
164
     * When the logmode is set to fail, failing adhoc tests should be logged.
164
     * When the logmode is set to fail, failing adhoc tests should be logged.
165
     */
165
     */
166
    public function test_logmode_fail_with_failing_adhoc_task() {
166
    public function test_logmode_fail_with_failing_adhoc_task(): void {
Línea 167... Línea 167...
167
        global $CFG;
167
        global $CFG;
Línea 168... Línea 168...
168
 
168
 
Línea 186... Línea 186...
186
    }
186
    }
Línea 187... Línea 187...
187
 
187
 
188
    /**
188
    /**
189
     * When the logmode is set to fail, failing scheduled tests should be logged.
189
     * When the logmode is set to fail, failing scheduled tests should be logged.
190
     */
190
     */
191
    public function test_logmode_fail_with_failing_scheduled_task() {
191
    public function test_logmode_fail_with_failing_scheduled_task(): void {
Línea 192... Línea 192...
192
        global $CFG;
192
        global $CFG;
Línea 193... Línea 193...
193
 
193
 
Línea 211... Línea 211...
211
    }
211
    }
Línea 212... Línea 212...
212
 
212
 
213
    /**
213
    /**
214
     * When the logmode is set to fail, failing adhoc tests should be logged.
214
     * When the logmode is set to fail, failing adhoc tests should be logged.
215
     */
215
     */
216
    public function test_logmode_any_with_failing_adhoc_task() {
216
    public function test_logmode_any_with_failing_adhoc_task(): void {
Línea 217... Línea 217...
217
        global $CFG;
217
        global $CFG;
Línea 218... Línea 218...
218
 
218
 
Línea 236... Línea 236...
236
    }
236
    }
Línea 237... Línea 237...
237
 
237
 
238
    /**
238
    /**
239
     * When the logmode is set to fail, failing scheduled tests should be logged.
239
     * When the logmode is set to fail, failing scheduled tests should be logged.
240
     */
240
     */
241
    public function test_logmode_any_with_failing_scheduled_task() {
241
    public function test_logmode_any_with_failing_scheduled_task(): void {
Línea 242... Línea 242...
242
        global $CFG;
242
        global $CFG;
Línea 243... Línea 243...
243
 
243
 
Línea 261... Línea 261...
261
    }
261
    }
Línea 262... Línea 262...
262
 
262
 
263
    /**
263
    /**
264
     * When the logmode is set to fail, passing adhoc tests should be logged.
264
     * When the logmode is set to fail, passing adhoc tests should be logged.
265
     */
265
     */
266
    public function test_logmode_any_with_passing_adhoc_task() {
266
    public function test_logmode_any_with_passing_adhoc_task(): void {
Línea 267... Línea 267...
267
        global $CFG;
267
        global $CFG;
Línea 268... Línea 268...
268
 
268
 
Línea 285... Línea 285...
285
    }
285
    }
Línea 286... Línea 286...
286
 
286
 
287
    /**
287
    /**
288
     * When the logmode is set to fail, passing scheduled tests should be logged.
288
     * When the logmode is set to fail, passing scheduled tests should be logged.
289
     */
289
     */
290
    public function test_logmode_any_with_passing_scheduled_task() {
290
    public function test_logmode_any_with_passing_scheduled_task(): void {
Línea 291... Línea 291...
291
        global $CFG;
291
        global $CFG;
Línea 292... Línea 292...
292
 
292
 
Línea 309... Línea 309...
309
    }
309
    }
Línea 310... Línea 310...
310
 
310
 
311
    /**
311
    /**
312
     * Ensure that start_logging cannot be called in a nested fashion.
312
     * Ensure that start_logging cannot be called in a nested fashion.
313
     */
313
     */
314
    public function test_prevent_nested_logging() {
314
    public function test_prevent_nested_logging(): void {
Línea 315... Línea 315...
315
        $this->resetAfterTest();
315
        $this->resetAfterTest();
316
 
316
 
Línea 322... Línea 322...
322
    }
322
    }
Línea 323... Línea 323...
323
 
323
 
324
    /**
324
    /**
325
     * Ensure that logging can be called after a previous log has finished.
325
     * Ensure that logging can be called after a previous log has finished.
326
     */
326
     */
327
    public function test_repeated_usages() {
327
    public function test_repeated_usages(): void {
Línea 328... Línea 328...
328
        $this->resetAfterTest();
328
        $this->resetAfterTest();
Línea 329... Línea 329...
329
 
329
 
Línea 344... Línea 344...
344
    }
344
    }
Línea 345... Línea 345...
345
 
345
 
346
    /**
346
    /**
347
     * Enusre that when finalise_log is called when logging is not active, nothing happens.
347
     * Enusre that when finalise_log is called when logging is not active, nothing happens.
348
     */
348
     */
349
    public function test_finalise_log_no_logging() {
349
    public function test_finalise_log_no_logging(): void {
Línea 350... Línea 350...
350
        $initialbufferstate = ob_get_status();
350
        $initialbufferstate = ob_get_status();
Línea 351... Línea 351...
351
 
351
 
Línea 356... Línea 356...
356
    }
356
    }
Línea 357... Línea 357...
357
 
357
 
358
    /**
358
    /**
359
     * When log capture is enabled, calls to the flush function should cause log output to be both returned and captured.
359
     * When log capture is enabled, calls to the flush function should cause log output to be both returned and captured.
360
     */
360
     */
361
    public function test_flush_on_own_buffer() {
361
    public function test_flush_on_own_buffer(): void {
Línea 362... Línea 362...
362
        $this->resetAfterTest();
362
        $this->resetAfterTest();
Línea 363... Línea 363...
363
 
363
 
Línea 381... Línea 381...
381
    }
381
    }
Línea 382... Línea 382...
382
 
382
 
383
    /**
383
    /**
384
     * When log capture is enabled, calls to the flush function should not affect any subsequent ob_start.
384
     * When log capture is enabled, calls to the flush function should not affect any subsequent ob_start.
385
     */
385
     */
386
    public function test_flush_does_not_flush_inner_buffers() {
386
    public function test_flush_does_not_flush_inner_buffers(): void {
Línea 387... Línea 387...
387
        $this->resetAfterTest();
387
        $this->resetAfterTest();
Línea 388... Línea 388...
388
 
388
 
Línea 409... Línea 409...
409
    }
409
    }
Línea 410... Línea 410...
410
 
410
 
411
    /**
411
    /**
412
     * When log capture is enabled, calls to the flush function should not affect any subsequent ob_start.
412
     * When log capture is enabled, calls to the flush function should not affect any subsequent ob_start.
413
     */
413
     */
414
    public function test_inner_flushed_buffers_are_logged() {
414
    public function test_inner_flushed_buffers_are_logged(): void {
Línea 415... Línea 415...
415
        $this->resetAfterTest();
415
        $this->resetAfterTest();
Línea 416... Línea 416...
416
 
416