Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 49... Línea 49...
49
    }
49
    }
Línea 50... Línea 50...
50
 
50
 
51
    /**
51
    /**
52
     * Check that our hook is called when a course is deleted.
52
     * Check that our hook is called when a course is deleted.
53
     */
53
     */
54
    public function test_pre_course_delete_hook() {
54
    public function test_pre_course_delete_hook(): void {
Línea 55... Línea 55...
55
        global $DB;
55
        global $DB;
56
 
56
 
57
        // This simulates a temporary course being cleaned up by a course restore.
57
        // This simulates a temporary course being cleaned up by a course restore.
Línea 74... Línea 74...
74
    }
74
    }
Línea 75... Línea 75...
75
 
75
 
76
    /**
76
    /**
77
     * Check that our hook is called when a course is deleted.
77
     * Check that our hook is called when a course is deleted.
78
     */
78
     */
79
    public function test_pre_course_category_delete_hook() {
79
    public function test_pre_course_category_delete_hook(): void {
Línea 80... Línea 80...
80
        global $DB;
80
        global $DB;
81
 
81
 
Línea 96... Línea 96...
96
    }
96
    }
Línea 97... Línea 97...
97
 
97
 
98
    /**
98
    /**
99
     * Test that we can restore recycle bin items.
99
     * Test that we can restore recycle bin items.
100
     */
100
     */
101
    public function test_restore() {
101
    public function test_restore(): void {
Línea 102... Línea 102...
102
        global $DB;
102
        global $DB;
Línea 103... Línea 103...
103
 
103
 
Línea 114... Línea 114...
114
    }
114
    }
Línea 115... Línea 115...
115
 
115
 
116
    /**
116
    /**
117
     * Test that we can delete recycle bin items.
117
     * Test that we can delete recycle bin items.
118
     */
118
     */
119
    public function test_delete() {
119
    public function test_delete(): void {
Línea 120... Línea 120...
120
        global $DB;
120
        global $DB;
Línea 121... Línea 121...
121
 
121
 
Línea 132... Línea 132...
132
    }
132
    }
Línea 133... Línea 133...
133
 
133
 
134
    /**
134
    /**
135
     * Test the cleanup task.
135
     * Test the cleanup task.
136
     */
136
     */
137
    public function test_cleanup_task() {
137
    public function test_cleanup_task(): void {
Línea 138... Línea 138...
138
        global $DB;
138
        global $DB;
139
 
139
 
Línea 202... Línea 202...
202
     * Tests that user data is restored when course is restored.
202
     * Tests that user data is restored when course is restored.
203
     *
203
     *
204
     * @dataProvider recycle_bin_settings_provider
204
     * @dataProvider recycle_bin_settings_provider
205
     * @param array $settings array of plugin, name, value stdClass().
205
     * @param array $settings array of plugin, name, value stdClass().
206
     */
206
     */
207
    public function test_course_restore_with_userdata($settings) {
207
    public function test_course_restore_with_userdata($settings): void {
208
        global $DB;
208
        global $DB;
Línea 209... Línea 209...
209
 
209
 
210
        // Force configuration changes from provider.
210
        // Force configuration changes from provider.
211
        foreach ($settings as $setting) {
211
        foreach ($settings as $setting) {
Línea 246... Línea 246...
246
     * Tests that user data is not restored when course is restored.
246
     * Tests that user data is not restored when course is restored.
247
     *
247
     *
248
     * @dataProvider recycle_bin_settings_provider
248
     * @dataProvider recycle_bin_settings_provider
249
     * @param array $settings array of plugin, name, value stdClass().
249
     * @param array $settings array of plugin, name, value stdClass().
250
     */
250
     */
251
    public function test_course_restore_without_userdata($settings) {
251
    public function test_course_restore_without_userdata($settings): void {
252
        global $DB;
252
        global $DB;
Línea 253... Línea 253...
253
 
253
 
254
        // Force configuration changes from provider.
254
        // Force configuration changes from provider.
255
        foreach ($settings as $setting) {
255
        foreach ($settings as $setting) {