Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 107... Línea 107...
107
    }
107
    }
Línea 108... Línea 108...
108
 
108
 
109
    /**
109
    /**
110
     * Test "Server files" from the system context
110
     * Test "Server files" from the system context
111
     */
111
     */
Línea 112... Línea 112...
112
    public function test_file_info_context_system() {
112
    public function test_file_info_context_system(): void {
Línea 113... Línea 113...
113
 
113
 
114
        // There is one non-empty category child and two category children.
114
        // There is one non-empty category child and two category children.
Línea 124... Línea 124...
124
    }
124
    }
Línea 125... Línea 125...
125
 
125
 
126
    /**
126
    /**
127
     * Test "Server files" from the system context, hide Misc category
127
     * Test "Server files" from the system context, hide Misc category
128
     */
128
     */
Línea 129... Línea 129...
129
    public function test_file_info_context_system_hidden() {
129
    public function test_file_info_context_system_hidden(): void {
130
 
130
 
Línea 131... Línea 131...
131
        // Hide the course category that contains our two courses. Teacher does not have cap to view hidden categories.
131
        // Hide the course category that contains our two courses. Teacher does not have cap to view hidden categories.
Línea 151... Línea 151...
151
    }
151
    }
Línea 152... Línea 152...
152
 
152
 
153
    /**
153
    /**
154
     * Test "Server files" from the course category context
154
     * Test "Server files" from the course category context
155
     */
155
     */
Línea 156... Línea 156...
156
    public function test_file_info_context_coursecat() {
156
    public function test_file_info_context_coursecat(): void {
Línea 157... Línea 157...
157
 
157
 
158
        // There are two non-empty courses.
158
        // There are two non-empty courses.
Línea 168... Línea 168...
168
    }
168
    }
Línea 169... Línea 169...
169
 
169
 
170
    /**
170
    /**
171
     * Test "Server files" from the course category context, only look for .jpg
171
     * Test "Server files" from the course category context, only look for .jpg
172
     */
172
     */
Línea 173... Línea 173...
173
    public function test_file_info_context_coursecat_jpg() {
173
    public function test_file_info_context_coursecat_jpg(): void {
Línea 174... Línea 174...
174
 
174
 
175
        // There is one non-empty category child and two category children.
175
        // There is one non-empty category child and two category children.
Línea 181... Línea 181...
181
    }
181
    }
Línea 182... Línea 182...
182
 
182
 
183
    /**
183
    /**
184
     * Test "Server files" from the course context (course1)
184
     * Test "Server files" from the course context (course1)
185
     */
185
     */
Línea 186... Línea 186...
186
    public function test_file_info_context_course_1() {
186
    public function test_file_info_context_course_1(): void {
187
 
187
 
188
        $browser = get_file_browser();
188
        $browser = get_file_browser();
189
        $fileinfo = $browser->get_file_info(\context_course::instance($this->course1->id));
189
        $fileinfo = $browser->get_file_info(\context_course::instance($this->course1->id));
Línea 212... Línea 212...
212
    }
212
    }
Línea 213... Línea 213...
213
 
213
 
214
    /**
214
    /**
215
     * Test "Server files" from the course context (course1)
215
     * Test "Server files" from the course context (course1)
216
     */
216
     */
Línea 217... Línea 217...
217
    public function test_file_info_context_course_2() {
217
    public function test_file_info_context_course_2(): void {
218
 
218
 
219
        // 2. Start from the course level.
219
        // 2. Start from the course level.
220
        $browser = get_file_browser();
220
        $browser = get_file_browser();
Línea 234... Línea 234...
234
    }
234
    }
Línea 235... Línea 235...
235
 
235
 
236
    /**
236
    /**
237
     * Test "Server files" from the course context (module1)
237
     * Test "Server files" from the course context (module1)
238
     */
238
     */
Línea 239... Línea 239...
239
    public function test_file_info_context_module_1() {
239
    public function test_file_info_context_module_1(): void {
240
 
240
 
241
        $module1context = \context_module::instance($this->module1->cmid);
241
        $module1context = \context_module::instance($this->module1->cmid);
242
        $browser = get_file_browser();
242
        $browser = get_file_browser();
Línea 250... Línea 250...
250
    }
250
    }
Línea 251... Línea 251...
251
 
251
 
252
    /**
252
    /**
253
     * Test "Server files" from the course context (module1)
253
     * Test "Server files" from the course context (module1)
254
     */
254
     */
Línea 255... Línea 255...
255
    public function test_file_info_context_module_2() {
255
    public function test_file_info_context_module_2(): void {
256
 
256
 
257
        $module2context = \context_module::instance($this->module2->cmid);
257
        $module2context = \context_module::instance($this->module2->cmid);
258
        $browser = get_file_browser();
258
        $browser = get_file_browser();