Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 85... Línea 85...
85
    }
85
    }
Línea 86... Línea 86...
86
 
86
 
87
    /**
87
    /**
88
     * Test for provider::get_metadata().
88
     * Test for provider::get_metadata().
89
     */
89
     */
90
    public function test_get_metadata() {
90
    public function test_get_metadata(): void {
91
        $collection = new collection('mod_choice');
91
        $collection = new collection('mod_choice');
92
        $newcollection = provider::get_metadata($collection);
92
        $newcollection = provider::get_metadata($collection);
93
        $itemcollection = $newcollection->get_collection();
93
        $itemcollection = $newcollection->get_collection();
Línea 106... Línea 106...
106
    }
106
    }
Línea 107... Línea 107...
107
 
107
 
108
    /**
108
    /**
109
     * Test for provider::get_contexts_for_userid().
109
     * Test for provider::get_contexts_for_userid().
110
     */
110
     */
111
    public function test_get_contexts_for_userid() {
111
    public function test_get_contexts_for_userid(): void {
Línea 112... Línea 112...
112
        $cm = get_coursemodule_from_instance('choice', $this->choice->id);
112
        $cm = get_coursemodule_from_instance('choice', $this->choice->id);
113
 
113
 
114
        $contextlist = provider::get_contexts_for_userid($this->student->id);
114
        $contextlist = provider::get_contexts_for_userid($this->student->id);
Línea 119... Línea 119...
119
    }
119
    }
Línea 120... Línea 120...
120
 
120
 
121
    /**
121
    /**
122
     * Test for provider::export_user_data().
122
     * Test for provider::export_user_data().
123
     */
123
     */
124
    public function test_export_for_context() {
124
    public function test_export_for_context(): void {
125
        $cm = get_coursemodule_from_instance('choice', $this->choice->id);
125
        $cm = get_coursemodule_from_instance('choice', $this->choice->id);
Línea 126... Línea 126...
126
        $cmcontext = \context_module::instance($cm->id);
126
        $cmcontext = \context_module::instance($cm->id);
127
 
127
 
Línea 132... Línea 132...
132
    }
132
    }
Línea 133... Línea 133...
133
 
133
 
134
    /**
134
    /**
135
     * Test for provider::delete_data_for_all_users_in_context().
135
     * Test for provider::delete_data_for_all_users_in_context().
136
     */
136
     */
137
    public function test_delete_data_for_all_users_in_context() {
137
    public function test_delete_data_for_all_users_in_context(): void {
Línea 138... Línea 138...
138
        global $DB;
138
        global $DB;
139
 
139
 
140
        $choice = $this->choice;
140
        $choice = $this->choice;
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
        $choice = $this->choice;
173
        $choice = $this->choice;
Línea 225... Línea 225...
225
    }
225
    }
Línea 226... Línea 226...
226
 
226
 
227
    /**
227
    /**
228
     * Test for provider::get_users_in_context().
228
     * Test for provider::get_users_in_context().
229
     */
229
     */
230
    public function test_get_users_in_context() {
230
    public function test_get_users_in_context(): void {
231
        $cm = get_coursemodule_from_instance('choice', $this->choice->id);
231
        $cm = get_coursemodule_from_instance('choice', $this->choice->id);
Línea 232... Línea 232...
232
        $cmcontext = \context_module::instance($cm->id);
232
        $cmcontext = \context_module::instance($cm->id);
233
 
233
 
Línea 241... Línea 241...
241
    }
241
    }
Línea 242... Línea 242...
242
 
242
 
243
    /**
243
    /**
244
     * Test for provider::get_users_in_context() with invalid context type.
244
     * Test for provider::get_users_in_context() with invalid context type.
245
     */
245
     */
246
    public function test_get_users_in_context_invalid_context_type() {
246
    public function test_get_users_in_context_invalid_context_type(): void {
Línea 247... Línea 247...
247
        $systemcontext = \context_system::instance();
247
        $systemcontext = \context_system::instance();
248
 
248
 
Línea 253... Línea 253...
253
    }
253
    }
Línea 254... Línea 254...
254
 
254
 
255
    /**
255
    /**
256
     * Test for provider::delete_data_for_users().
256
     * Test for provider::delete_data_for_users().
257
     */
257
     */
258
    public function test_delete_data_for_users() {
258
    public function test_delete_data_for_users(): void {
Línea 259... Línea 259...
259
        global $DB;
259
        global $DB;
260
 
260
 
261
        $choice = $this->choice;
261
        $choice = $this->choice;