Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 55... Línea 55...
55
    }
55
    }
Línea 56... Línea 56...
56
 
56
 
57
    /**
57
    /**
58
     * Check that our hook is called when an activity is deleted.
58
     * Check that our hook is called when an activity is deleted.
59
     */
59
     */
60
    public function test_pre_course_module_delete_hook() {
60
    public function test_pre_course_module_delete_hook(): void {
Línea 61... Línea 61...
61
        global $DB;
61
        global $DB;
62
 
62
 
Línea 78... Línea 78...
78
    }
78
    }
Línea 79... Línea 79...
79
 
79
 
80
    /**
80
    /**
81
     * Test that we can restore recycle bin items.
81
     * Test that we can restore recycle bin items.
82
     */
82
     */
83
    public function test_restore() {
83
    public function test_restore(): void {
Línea 84... Línea 84...
84
        global $DB;
84
        global $DB;
Línea 85... Línea 85...
85
 
85
 
Línea 100... Línea 100...
100
    }
100
    }
Línea 101... Línea 101...
101
 
101
 
102
    /**
102
    /**
103
     * Test that we can delete recycle bin items.
103
     * Test that we can delete recycle bin items.
104
     */
104
     */
105
    public function test_delete() {
105
    public function test_delete(): void {
Línea 106... Línea 106...
106
        global $DB;
106
        global $DB;
Línea 107... Línea 107...
107
 
107
 
Línea 125... Línea 125...
125
    }
125
    }
Línea 126... Línea 126...
126
 
126
 
127
    /**
127
    /**
128
     * Test the cleanup task.
128
     * Test the cleanup task.
129
     */
129
     */
130
    public function test_cleanup_task() {
130
    public function test_cleanup_task(): void {
Línea 131... Línea 131...
131
        global $DB;
131
        global $DB;
Línea 132... Línea 132...
132
 
132
 
Línea 202... Línea 202...
202
     * Tests that user data is restored when module is restored.
202
     * Tests that user data is restored when module 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_coursemodule_restore_with_userdata($settings) {
207
    public function test_coursemodule_restore_with_userdata($settings): void {
208
        // Force configuration changes from provider.
208
        // Force configuration changes from provider.
209
        foreach ($settings as $setting) {
209
        foreach ($settings as $setting) {
210
            // Need to create a directory for backup_auto_destination.
210
            // Need to create a directory for backup_auto_destination.
211
            if ($setting->plugin === 'backup' && $setting->name === 'backup_auto_destination' && $setting->value === true) {
211
            if ($setting->plugin === 'backup' && $setting->name === 'backup_auto_destination' && $setting->value === true) {
212
                $setting->value = make_request_directory();
212
                $setting->value = make_request_directory();
Línea 250... Línea 250...
250
     * in Automated backup setup settings "backup_auto_activities" is disabled.
250
     * in Automated backup setup settings "backup_auto_activities" is disabled.
251
     *
251
     *
252
     * @dataProvider recycle_bin_settings_provider
252
     * @dataProvider recycle_bin_settings_provider
253
     * @covers ::store_item
253
     * @covers ::store_item
254
     */
254
     */
255
    public function test_coursemodule_restore_with_activity_setting_disabled() {
255
    public function test_coursemodule_restore_with_activity_setting_disabled(): void {
Línea 256... Línea 256...
256
 
256
 
257
        // Set the configuration to not include activities in the automated backup.
257
        // Set the configuration to not include activities in the automated backup.
Línea 258... Línea 258...
258
        set_config('backup_auto_activities', false, 'backup');
258
        set_config('backup_auto_activities', false, 'backup');
Línea 272... Línea 272...
272
     * Tests that user data is not restored when module is restored.
272
     * Tests that user data is not restored when module is restored.
273
     *
273
     *
274
     * @dataProvider recycle_bin_settings_provider
274
     * @dataProvider recycle_bin_settings_provider
275
     * @param array $settings array of plugin, name, value stdClass().
275
     * @param array $settings array of plugin, name, value stdClass().
276
     */
276
     */
277
    public function test_coursemodule_restore_without_userdata($settings) {
277
    public function test_coursemodule_restore_without_userdata($settings): void {
278
        // Force configuration changes from provider.
278
        // Force configuration changes from provider.
279
        foreach ($settings as $setting) {
279
        foreach ($settings as $setting) {
280
            // Need to create a directory for backup_auto_destination.
280
            // Need to create a directory for backup_auto_destination.
281
            if ($setting->plugin === 'backup' && $setting->name === 'backup_auto_destination' && $setting->value === true) {
281
            if ($setting->plugin === 'backup' && $setting->name === 'backup_auto_destination' && $setting->value === true) {
282
                $setting->value = make_request_directory();
282
                $setting->value = make_request_directory();