Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 66... Línea 66...
66
    }
66
    }
Línea 67... Línea 67...
67
 
67
 
68
    /**
68
    /**
69
     * Test base get search fileareas
69
     * Test base get search fileareas
70
     */
70
     */
Línea 71... Línea 71...
71
    public function test_get_search_fileareas_base() {
71
    public function test_get_search_fileareas_base(): void {
72
 
72
 
73
        $builder = $this->getMockBuilder('\core_search\base');
73
        $builder = $this->getMockBuilder('\core_search\base');
Línea 80... Línea 80...
80
    }
80
    }
Línea 81... Línea 81...
81
 
81
 
82
    /**
82
    /**
83
     * Test base attach files
83
     * Test base attach files
84
     */
84
     */
85
    public function test_attach_files_base() {
85
    public function test_attach_files_base(): void {
86
        $filearea = 'search';
86
        $filearea = 'search';
Línea 87... Línea 87...
87
        $component = 'mod_test';
87
        $component = 'mod_test';
88
 
88
 
Línea 126... Línea 126...
126
    }
126
    }
Línea 127... Línea 127...
127
 
127
 
128
    /**
128
    /**
129
     * Tests the base version (stub) of get_contexts_to_reindex.
129
     * Tests the base version (stub) of get_contexts_to_reindex.
130
     */
130
     */
131
    public function test_get_contexts_to_reindex() {
131
    public function test_get_contexts_to_reindex(): void {
132
        $area = new \core_mocksearch\search\mock_search_area();
132
        $area = new \core_mocksearch\search\mock_search_area();
133
        $this->assertEquals([\context_system::instance()],
133
        $this->assertEquals([\context_system::instance()],
134
                iterator_to_array($area->get_contexts_to_reindex(), false));
134
                iterator_to_array($area->get_contexts_to_reindex(), false));
Línea 135... Línea 135...
135
    }
135
    }
136
 
136
 
137
    /**
137
    /**
138
     * Test default document icon.
138
     * Test default document icon.
139
     */
139
     */
140
    public function test_get_default_doc_icon() {
140
    public function test_get_default_doc_icon(): void {
141
        $basearea = $this->getMockBuilder('\core_search\base')
141
        $basearea = $this->getMockBuilder('\core_search\base')
Línea 142... Línea 142...
142
            ->disableOriginalConstructor()
142
            ->disableOriginalConstructor()
Línea 153... Línea 153...
153
    }
153
    }
Línea 154... Línea 154...
154
 
154
 
155
    /**
155
    /**
156
     * Test base search area category names.
156
     * Test base search area category names.
157
     */
157
     */
158
    public function test_get_category_names() {
158
    public function test_get_category_names(): void {
159
        $builder = $this->getMockBuilder('\core_search\base');
159
        $builder = $this->getMockBuilder('\core_search\base');
160
        $builder->disableOriginalConstructor();
160
        $builder->disableOriginalConstructor();
Línea 161... Línea 161...
161
        $stub = $builder->getMockForAbstractClass();
161
        $stub = $builder->getMockForAbstractClass();
Línea 165... Línea 165...
165
    }
165
    }
Línea 166... Línea 166...
166
 
166
 
167
    /**
167
    /**
168
     * Test getting all required search area setting names.
168
     * Test getting all required search area setting names.
169
     */
169
     */
170
    public function test_get_settingnames() {
170
    public function test_get_settingnames(): void {
171
        $expected = array('_enabled', '_indexingstart', '_indexingend', '_lastindexrun',
171
        $expected = array('_enabled', '_indexingstart', '_indexingend', '_lastindexrun',
172
            '_docsignored', '_docsprocessed', '_recordsprocessed', '_partial');
172
            '_docsignored', '_docsprocessed', '_recordsprocessed', '_partial');
173
        $this->assertEquals($expected, \core_search\base::get_settingnames());
173
        $this->assertEquals($expected, \core_search\base::get_settingnames());
174
    }
174
    }