Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 60... Línea 60...
60
    }
60
    }
Línea 61... Línea 61...
61
 
61
 
62
    /**
62
    /**
63
     * Test the task idle run. Nothing should explode.
63
     * Test the task idle run. Nothing should explode.
64
     */
64
     */
65
    public function test_backup_cleanup_task_idle() {
65
    public function test_backup_cleanup_task_idle(): void {
66
        $task = new \core\task\backup_cleanup_task();
66
        $task = new \core\task\backup_cleanup_task();
67
        $task->execute();
67
        $task->execute();
Línea 68... Línea 68...
68
    }
68
    }
69
 
69
 
70
    /**
70
    /**
71
     * Test the task exits when backup | loglifetime setting is not set.
71
     * Test the task exits when backup | loglifetime setting is not set.
72
     */
72
     */
73
    public function test_backup_cleanup_task_exits() {
73
    public function test_backup_cleanup_task_exits(): void {
74
        set_config('loglifetime', 0, 'backup');
74
        set_config('loglifetime', 0, 'backup');
75
        $task = new \core\task\backup_cleanup_task();
75
        $task = new \core\task\backup_cleanup_task();
76
        ob_start();
76
        ob_start();
Línea 81... Línea 81...
81
    }
81
    }
Línea 82... Línea 82...
82
 
82
 
83
    /**
83
    /**
84
     * Test the task deletes records from DB.
84
     * Test the task deletes records from DB.
85
     */
85
     */
86
    public function test_backup_cleanup_task_deletes_records() {
86
    public function test_backup_cleanup_task_deletes_records(): void {
Línea 87... Línea 87...
87
        global $DB;
87
        global $DB;
88
 
88
 
89
        // Create a course.
89
        // Create a course.
Línea 113... Línea 113...
113
    }
113
    }
Línea 114... Línea 114...
114
 
114
 
115
    /**
115
    /**
116
     * Test the task deletes files from file system.
116
     * Test the task deletes files from file system.
117
     */
117
     */
118
    public function test_backup_cleanup_task_deletes_files() {
118
    public function test_backup_cleanup_task_deletes_files(): void {
Línea 119... Línea 119...
119
        global $CFG;
119
        global $CFG;
120
 
120
 
121
        // Create a course.
121
        // Create a course.