Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 91... Línea 91...
91
    /**
91
    /**
92
     * Test indexing process.
92
     * Test indexing process.
93
     *
93
     *
94
     * @return void
94
     * @return void
95
     */
95
     */
96
    public function test_index() {
96
    public function test_index(): void {
97
        global $DB;
97
        global $DB;
Línea 98... Línea 98...
98
 
98
 
Línea 99... Línea 99...
99
        $this->add_mock_search_area();
99
        $this->add_mock_search_area();
Línea 118... Línea 118...
118
    /**
118
    /**
119
     * Test search filters.
119
     * Test search filters.
120
     *
120
     *
121
     * @return void
121
     * @return void
122
     */
122
     */
123
    public function test_search() {
123
    public function test_search(): void {
124
        global $USER, $DB;
124
        global $USER, $DB;
Línea 125... Línea 125...
125
 
125
 
Línea 126... Línea 126...
126
        $this->add_mock_search_area();
126
        $this->add_mock_search_area();
Línea 205... Línea 205...
205
    /**
205
    /**
206
     * Test delete function
206
     * Test delete function
207
     *
207
     *
208
     * @return void
208
     * @return void
209
     */
209
     */
210
    public function test_delete() {
210
    public function test_delete(): void {
Línea 211... Línea 211...
211
 
211
 
Línea 212... Línea 212...
212
        $this->add_mock_search_area();
212
        $this->add_mock_search_area();
213
 
213
 
Línea 230... Línea 230...
230
    /**
230
    /**
231
     * Test user is allowed.
231
     * Test user is allowed.
232
     *
232
     *
233
     * @return void
233
     * @return void
234
     */
234
     */
235
    public function test_alloweduserid() {
235
    public function test_alloweduserid(): void {
Línea 236... Línea 236...
236
 
236
 
Línea 237... Línea 237...
237
        $this->add_mock_search_area();
237
        $this->add_mock_search_area();
Línea 304... Línea 304...
304
 
304
 
305
        $this->assertEquals(0, $results[0]->get('owneruserid'));
305
        $this->assertEquals(0, $results[0]->get('owneruserid'));
306
        $this->assertEquals($originalid, $results[0]->get('id'));
306
        $this->assertEquals($originalid, $results[0]->get('id'));
Línea 307... Línea 307...
307
    }
307
    }
Línea 308... Línea 308...
308
 
308
 
Línea 309... Línea 309...
309
    public function test_delete_by_id() {
309
    public function test_delete_by_id(): void {
310
 
310
 
Línea 336... Línea 336...
336
    }
336
    }
Línea 337... Línea 337...
337
 
337
 
338
    /**
338
    /**
339
     * Tries out deleting data for a context or a course.
339
     * Tries out deleting data for a context or a course.
340
     */
340
     */
341
    public function test_deleted_contexts_and_courses() {
341
    public function test_deleted_contexts_and_courses(): void {
342
        // Create some courses and activities.
342
        // Create some courses and activities.
343
        $generator = $this->getDataGenerator();
343
        $generator = $this->getDataGenerator();
344
        $course1 = $generator->create_course(['fullname' => 'C1', 'summary' => 'xyzzy']);
344
        $course1 = $generator->create_course(['fullname' => 'C1', 'summary' => 'xyzzy']);
345
        $course1page1 = $generator->create_module('page', ['course' => $course1, 'name' => 'C1P1', 'content' => 'xyzzy']);
345
        $course1page1 = $generator->create_module('page', ['course' => $course1, 'name' => 'C1P1', 'content' => 'xyzzy']);