Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 48... Línea 48...
48
    }
48
    }
Línea 49... Línea 49...
49
 
49
 
50
    /**
50
    /**
51
     * Test getting the context for the user ID related to this plugin.
51
     * Test getting the context for the user ID related to this plugin.
52
     */
52
     */
53
    public function test_get_contexts_for_userid() {
53
    public function test_get_contexts_for_userid(): void {
54
        // Create system cohort and category cohort.
54
        // Create system cohort and category cohort.
55
        $coursecategory = $this->getDataGenerator()->create_category();
55
        $coursecategory = $this->getDataGenerator()->create_category();
56
        $coursecategoryctx = \context_coursecat::instance($coursecategory->id);
56
        $coursecategoryctx = \context_coursecat::instance($coursecategory->id);
57
        $systemctx = \context_system::instance();
57
        $systemctx = \context_system::instance();
Línea 77... Línea 77...
77
    }
77
    }
Línea 78... Línea 78...
78
 
78
 
79
    /**
79
    /**
80
     * Test that data is exported correctly for this plugin.
80
     * Test that data is exported correctly for this plugin.
81
     */
81
     */
82
    public function test_export_user_data() {
82
    public function test_export_user_data(): void {
83
        // Create system cohort and category cohort.
83
        // Create system cohort and category cohort.
84
        $coursecategory = $this->getDataGenerator()->create_category();
84
        $coursecategory = $this->getDataGenerator()->create_category();
85
        $coursecategoryctx = \context_coursecat::instance($coursecategory->id);
85
        $coursecategoryctx = \context_coursecat::instance($coursecategory->id);
86
        $systemctx = \context_system::instance();
86
        $systemctx = \context_system::instance();
Línea 120... Línea 120...
120
    }
120
    }
Línea 121... Línea 121...
121
 
121
 
122
    /**
122
    /**
123
     * Test for provider::delete_data_for_all_users_in_context().
123
     * Test for provider::delete_data_for_all_users_in_context().
124
     */
124
     */
125
    public function test_delete_data_for_all_users_in_context() {
125
    public function test_delete_data_for_all_users_in_context(): void {
Línea 126... Línea 126...
126
        global $DB;
126
        global $DB;
127
 
127
 
128
        // Create system cohort and category cohort.
128
        // Create system cohort and category cohort.
Línea 165... Línea 165...
165
    }
165
    }
Línea 166... Línea 166...
166
 
166
 
167
    /**
167
    /**
168
     * Test for provider::delete_data_for_user().
168
     * Test for provider::delete_data_for_user().
169
     */
169
     */
170
    public function test_delete_data_for_user() {
170
    public function test_delete_data_for_user(): void {
Línea 171... Línea 171...
171
        global $DB;
171
        global $DB;
172
 
172
 
173
        // Create system cohort and category cohort.
173
        // Create system cohort and category cohort.
Línea 222... Línea 222...
222
    }
222
    }
Línea 223... Línea 223...
223
 
223
 
224
    /**
224
    /**
225
     * Test that only users within a course context are fetched.
225
     * Test that only users within a course context are fetched.
226
     */
226
     */
227
    public function test_get_users_in_context() {
227
    public function test_get_users_in_context(): void {
Línea 228... Línea 228...
228
        $component = 'core_cohort';
228
        $component = 'core_cohort';
229
 
229
 
230
        // Create system cohort and category cohort.
230
        // Create system cohort and category cohort.
Línea 278... Línea 278...
278
    }
278
    }
Línea 279... Línea 279...
279
 
279
 
280
    /**
280
    /**
281
     * Test that data for users in approved userlist is deleted.
281
     * Test that data for users in approved userlist is deleted.
282
     */
282
     */
283
    public function test_delete_data_for_users() {
283
    public function test_delete_data_for_users(): void {
Línea 284... Línea 284...
284
        $component = 'core_cohort';
284
        $component = 'core_cohort';
285
 
285
 
286
        // Create system cohort and category cohort.
286
        // Create system cohort and category cohort.