Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 106... Línea 106...
106
    }
106
    }
Línea 107... Línea 107...
107
 
107
 
108
    /**
108
    /**
109
     * Test base activity get search fileareas
109
     * Test base activity get search fileareas
110
     */
110
     */
Línea 111... Línea 111...
111
    public function test_get_search_fileareas_base() {
111
    public function test_get_search_fileareas_base(): void {
112
 
112
 
113
        $builder = $this->getMockBuilder('\core_search\base_activity');
113
        $builder = $this->getMockBuilder('\core_search\base_activity');
Línea 120... Línea 120...
120
    }
120
    }
Línea 121... Línea 121...
121
 
121
 
122
    /**
122
    /**
123
     * Test base attach files
123
     * Test base attach files
124
     */
124
     */
125
    public function test_attach_files_base() {
125
    public function test_attach_files_base(): void {
126
        $filearea = 'intro';
126
        $filearea = 'intro';
127
        $component = 'mod_forum';
127
        $component = 'mod_forum';
Línea 128... Línea 128...
128
        $module = 'forum';
128
        $module = 'forum';
Línea 174... Línea 174...
174
    }
174
    }
Línea 175... Línea 175...
175
 
175
 
176
    /**
176
    /**
177
     * Tests getting the recordset.
177
     * Tests getting the recordset.
178
     */
178
     */
179
    public function test_get_document_recordset() {
179
    public function test_get_document_recordset(): void {
Línea 180... Línea 180...
180
        global $USER, $DB;
180
        global $USER, $DB;
181
 
181
 
182
        // Get all the forums to index (no restriction).
182
        // Get all the forums to index (no restriction).
Línea 283... Línea 283...
283
    }
283
    }
Línea 284... Línea 284...
284
 
284
 
285
    /**
285
    /**
286
     * Tests the get_doc_url function.
286
     * Tests the get_doc_url function.
287
     */
287
     */
288
    public function test_get_doc_url() {
288
    public function test_get_doc_url(): void {
289
        $area = new \mod_forum\search\activity();
289
        $area = new \mod_forum\search\activity();
Línea 290... Línea 290...
290
        $results = self::recordset_to_indexed_array($area->get_document_recordset());
290
        $results = self::recordset_to_indexed_array($area->get_document_recordset());
291
 
291
 
Línea 297... Línea 297...
297
    }
297
    }
Línea 298... Línea 298...
298
 
298
 
299
    /**
299
    /**
300
     * Tests the check_access function.
300
     * Tests the check_access function.
301
     */
301
     */
302
    public function test_check_access() {
302
    public function test_check_access(): void {
303
        global $CFG;
303
        global $CFG;
Línea 304... Línea 304...
304
        require_once($CFG->dirroot . '/course/lib.php');
304
        require_once($CFG->dirroot . '/course/lib.php');
305
 
305
 
Línea 331... Línea 331...
331
 
331
 
332
    /**
332
    /**
333
     * Tests the module version of get_contexts_to_reindex, which is supposed to return all the
333
     * Tests the module version of get_contexts_to_reindex, which is supposed to return all the
334
     * activity contexts in order of date added.
334
     * activity contexts in order of date added.
335
     */
335
     */
336
    public function test_get_contexts_to_reindex() {
336
    public function test_get_contexts_to_reindex(): void {
Línea 337... Línea 337...
337
        global $DB;
337
        global $DB;
Línea 338... Línea 338...
338
 
338
 
Línea 369... Línea 369...
369
    }
369
    }
Línea 370... Línea 370...
370
 
370
 
371
    /**
371
    /**
372
     * Test document icon.
372
     * Test document icon.
373
     */
373
     */
374
    public function test_get_doc_icon() {
374
    public function test_get_doc_icon(): void {
375
        $baseactivity = $this->getMockBuilder('\core_search\base_activity')
375
        $baseactivity = $this->getMockBuilder('\core_search\base_activity')
376
            ->disableOriginalConstructor()
376
            ->disableOriginalConstructor()
377
            ->onlyMethods(array('get_module_name'))
377
            ->onlyMethods(array('get_module_name'))