Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 45... Línea 45...
45
 */
45
 */
46
class cronhelper_test extends \advanced_testcase {
46
class cronhelper_test extends \advanced_testcase {
47
    /**
47
    /**
48
     * Test {@link backup_cron_automated_helper::calculate_next_automated_backup}.
48
     * Test {@link backup_cron_automated_helper::calculate_next_automated_backup}.
49
     */
49
     */
50
    public function test_next_automated_backup() {
50
    public function test_next_automated_backup(): void {
51
        global $CFG;
51
        global $CFG;
Línea 52... Línea 52...
52
 
52
 
53
        $this->resetAfterTest();
53
        $this->resetAfterTest();
Línea 258... Línea 258...
258
    }
258
    }
Línea 259... Línea 259...
259
 
259
 
260
    /**
260
    /**
261
     * Test {@link backup_cron_automated_helper::get_backups_to_delete}.
261
     * Test {@link backup_cron_automated_helper::get_backups_to_delete}.
262
     */
262
     */
263
    public function test_get_backups_to_delete() {
263
    public function test_get_backups_to_delete(): void {
264
        $this->resetAfterTest();
264
        $this->resetAfterTest();
265
        // Active only backup_auto_max_kept config to 2 days.
265
        // Active only backup_auto_max_kept config to 2 days.
266
        set_config('backup_auto_max_kept', '2', 'backup');
266
        set_config('backup_auto_max_kept', '2', 'backup');
267
        set_config('backup_auto_delete_days', '0', 'backup');
267
        set_config('backup_auto_delete_days', '0', 'backup');
Línea 334... Línea 334...
334
    }
334
    }
Línea 335... Línea 335...
335
 
335
 
336
    /**
336
    /**
337
     * Test {@link backup_cron_automated_helper::is_course_modified}.
337
     * Test {@link backup_cron_automated_helper::is_course_modified}.
338
     */
338
     */
339
    public function test_is_course_modified() {
339
    public function test_is_course_modified(): void {
340
        $this->resetAfterTest();
340
        $this->resetAfterTest();
Línea 341... Línea 341...
341
        $this->preventResetByRollback();
341
        $this->preventResetByRollback();
342
 
342
 
Línea 406... Línea 406...
406
    }
406
    }
Línea 407... Línea 407...
407
 
407
 
408
    /**
408
    /**
409
     * Test the selection and ordering of courses to be backed up.
409
     * Test the selection and ordering of courses to be backed up.
410
     */
410
     */
411
    public function test_get_courses() {
411
    public function test_get_courses(): void {
Línea 412... Línea 412...
412
        $this->resetAfterTest();
412
        $this->resetAfterTest();
Línea 413... Línea 413...
413
 
413
 
Línea 442... Línea 442...
442
 
442
 
443
    /**
443
    /**
444
     * Test the selection and ordering of courses to be backed up.
444
     * Test the selection and ordering of courses to be backed up.
445
     * Where it is not yet time to start backups for courses with existing backups.
445
     * Where it is not yet time to start backups for courses with existing backups.
446
     */
446
     */
447
    public function test_get_courses_starttime() {
447
    public function test_get_courses_starttime(): void {
Línea 448... Línea 448...
448
        $this->resetAfterTest();
448
        $this->resetAfterTest();
Línea 449... Línea 449...
449
 
449