Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 70... Línea 70...
70
    /**
70
    /**
71
     * Indexing courses contents.
71
     * Indexing courses contents.
72
     *
72
     *
73
     * @return void
73
     * @return void
74
     */
74
     */
75
    public function test_courses_indexing() {
75
    public function test_courses_indexing(): void {
Línea 76... Línea 76...
76
 
76
 
77
        // Returns the instance as long as the area is supported.
77
        // Returns the instance as long as the area is supported.
78
        $searcharea = \core_search\manager::get_search_area($this->coursesareaid);
78
        $searcharea = \core_search\manager::get_search_area($this->coursesareaid);
Línea 113... Línea 113...
113
    }
113
    }
Línea 114... Línea 114...
114
 
114
 
115
    /**
115
    /**
116
     * Tests course indexing support for contexts.
116
     * Tests course indexing support for contexts.
117
     */
117
     */
118
    public function test_courses_indexing_contexts() {
118
    public function test_courses_indexing_contexts(): void {
Línea 119... Línea 119...
119
        global $DB, $USER, $SITE;
119
        global $DB, $USER, $SITE;
Línea 120... Línea 120...
120
 
120
 
Línea 194... Línea 194...
194
    /**
194
    /**
195
     * Document contents.
195
     * Document contents.
196
     *
196
     *
197
     * @return void
197
     * @return void
198
     */
198
     */
199
    public function test_courses_document() {
199
    public function test_courses_document(): void {
Línea 200... Línea 200...
200
 
200
 
201
        // Returns the instance as long as the area is supported.
201
        // Returns the instance as long as the area is supported.
202
        $searcharea = \core_search\manager::get_search_area($this->coursesareaid);
202
        $searcharea = \core_search\manager::get_search_area($this->coursesareaid);
Línea 224... Línea 224...
224
    /**
224
    /**
225
     * Document accesses.
225
     * Document accesses.
226
     *
226
     *
227
     * @return void
227
     * @return void
228
     */
228
     */
229
    public function test_courses_access() {
229
    public function test_courses_access(): void {
230
        $this->resetAfterTest();
230
        $this->resetAfterTest();
Línea 231... Línea 231...
231
 
231
 
232
        // Returns the instance as long as the area is supported.
232
        // Returns the instance as long as the area is supported.
Línea 257... Línea 257...
257
    }
257
    }
Línea 258... Línea 258...
258
 
258
 
259
    /**
259
    /**
260
     * Indexing section contents.
260
     * Indexing section contents.
261
     */
261
     */
262
    public function test_section_indexing() {
262
    public function test_section_indexing(): void {
Línea 263... Línea 263...
263
        global $DB, $USER;
263
        global $DB, $USER;
264
 
264
 
265
        // Returns the instance as long as the area is supported.
265
        // Returns the instance as long as the area is supported.
Línea 350... Línea 350...
350
    }
350
    }
Línea 351... Línea 351...
351
 
351
 
352
    /**
352
    /**
353
     * Document contents for sections.
353
     * Document contents for sections.
354
     */
354
     */
355
    public function test_section_document() {
355
    public function test_section_document(): void {
Línea 356... Línea 356...
356
        global $DB;
356
        global $DB;
Línea 357... Línea 357...
357
 
357
 
Línea 384... Línea 384...
384
    }
384
    }
Línea 385... Línea 385...
385
 
385
 
386
    /**
386
    /**
387
     * Document access for sections.
387
     * Document access for sections.
388
     */
388
     */
389
    public function test_section_access() {
389
    public function test_section_access(): void {
Línea 390... Línea 390...
390
        global $DB;
390
        global $DB;
Línea 391... Línea 391...
391
 
391
 
Línea 459... Línea 459...
459
    /**
459
    /**
460
     * Indexing custom fields contents.
460
     * Indexing custom fields contents.
461
     *
461
     *
462
     * @return void
462
     * @return void
463
     */
463
     */
464
    public function test_customfield_indexing() {
464
    public function test_customfield_indexing(): void {
465
        // Returns the instance as long as the area is supported.
465
        // Returns the instance as long as the area is supported.
466
        $searcharea = \core_search\manager::get_search_area($this->customfieldareaid);
466
        $searcharea = \core_search\manager::get_search_area($this->customfieldareaid);
467
        $this->assertInstanceOf('\core_course\search\customfield', $searcharea);
467
        $this->assertInstanceOf('\core_course\search\customfield', $searcharea);
Línea 468... Línea 468...
468
 
468
 
Línea 506... Línea 506...
506
    /**
506
    /**
507
     * Document contents for custom fields.
507
     * Document contents for custom fields.
508
     *
508
     *
509
     * @return void
509
     * @return void
510
     */
510
     */
511
    public function test_customfield_document() {
511
    public function test_customfield_document(): void {
512
        global $DB;
512
        global $DB;
513
        // Returns the instance as long as the area is supported.
513
        // Returns the instance as long as the area is supported.
514
        $searcharea = \core_search\manager::get_search_area($this->customfieldareaid);
514
        $searcharea = \core_search\manager::get_search_area($this->customfieldareaid);
Línea 515... Línea 515...
515
 
515
 
Línea 541... Línea 541...
541
    }
541
    }
Línea 542... Línea 542...
542
 
542
 
543
    /**
543
    /**
544
     * Document accesses for customfield area.
544
     * Document accesses for customfield area.
545
     */
545
     */
546
    public function test_customfield_access() {
546
    public function test_customfield_access(): void {
Línea 547... Línea 547...
547
        global $DB;
547
        global $DB;
Línea 548... Línea 548...
548
 
548
 
Línea 613... Línea 613...
613
    }
613
    }
Línea 614... Línea 614...
614
 
614
 
615
    /**
615
    /**
616
     * Test document icon for course area.
616
     * Test document icon for course area.
617
     */
617
     */
618
    public function test_get_doc_icon_for_course_area() {
618
    public function test_get_doc_icon_for_course_area(): void {
Línea 619... Línea 619...
619
        $searcharea = \core_search\manager::get_search_area($this->coursesareaid);
619
        $searcharea = \core_search\manager::get_search_area($this->coursesareaid);
620
 
620
 
621
        $document = $this->getMockBuilder('\core_search\document')
621
        $document = $this->getMockBuilder('\core_search\document')
Línea 629... Línea 629...
629
    }
629
    }
Línea 630... Línea 630...
630
 
630
 
631
    /**
631
    /**
632
     * Test document icon for section area.
632
     * Test document icon for section area.
633
     */
633
     */
634
    public function test_get_doc_icon_for_section_area() {
634
    public function test_get_doc_icon_for_section_area(): void {
Línea 635... Línea 635...
635
        $searcharea = \core_search\manager::get_search_area($this->sectionareaid);
635
        $searcharea = \core_search\manager::get_search_area($this->sectionareaid);
636
 
636
 
637
        $document = $this->getMockBuilder('\core_search\document')
637
        $document = $this->getMockBuilder('\core_search\document')
Línea 645... Línea 645...
645
    }
645
    }
Línea 646... Línea 646...
646
 
646
 
647
    /**
647
    /**
648
     * Test assigned search categories.
648
     * Test assigned search categories.
649
     */
649
     */
650
    public function test_get_category_names() {
650
    public function test_get_category_names(): void {
651
        $coursessearcharea = \core_search\manager::get_search_area($this->coursesareaid);
651
        $coursessearcharea = \core_search\manager::get_search_area($this->coursesareaid);
652
        $sectionsearcharea = \core_search\manager::get_search_area($this->sectionareaid);
652
        $sectionsearcharea = \core_search\manager::get_search_area($this->sectionareaid);
Línea 653... Línea 653...
653
        $customfieldssearcharea = \core_search\manager::get_search_area($this->customfieldareaid);
653
        $customfieldssearcharea = \core_search\manager::get_search_area($this->customfieldareaid);