Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 38... Línea 38...
38
class externallib_test extends externallib_advanced_testcase {
38
class externallib_test extends externallib_advanced_testcase {
Línea 39... Línea 39...
39
 
39
 
40
    /**
40
    /**
41
     * Test get_course_blocks
41
     * Test get_course_blocks
42
     */
42
     */
43
    public function test_get_course_blocks() {
43
    public function test_get_course_blocks(): void {
Línea 44... Línea 44...
44
        global $DB, $FULLME;
44
        global $DB, $FULLME;
Línea 45... Línea 45...
45
 
45
 
Línea 71... Línea 71...
71
    }
71
    }
Línea 72... Línea 72...
72
 
72
 
73
    /**
73
    /**
74
     * Test get_course_blocks on site home
74
     * Test get_course_blocks on site home
75
     */
75
     */
76
    public function test_get_course_blocks_site_home() {
76
    public function test_get_course_blocks_site_home(): void {
Línea 77... Línea 77...
77
        global $DB, $FULLME;
77
        global $DB, $FULLME;
Línea 78... Línea 78...
78
 
78
 
Línea 100... Línea 100...
100
    }
100
    }
Línea 101... Línea 101...
101
 
101
 
102
    /**
102
    /**
103
     * Test get_course_blocks
103
     * Test get_course_blocks
104
     */
104
     */
105
    public function test_get_course_blocks_overrides() {
105
    public function test_get_course_blocks_overrides(): void {
Línea 106... Línea 106...
106
        global $DB, $CFG, $FULLME;
106
        global $DB, $CFG, $FULLME;
Línea 107... Línea 107...
107
 
107
 
Línea 135... Línea 135...
135
    }
135
    }
Línea 136... Línea 136...
136
 
136
 
137
    /**
137
    /**
138
     * Test get_course_blocks contents
138
     * Test get_course_blocks contents
139
     */
139
     */
140
    public function test_get_course_blocks_contents() {
140
    public function test_get_course_blocks_contents(): void {
Línea 141... Línea 141...
141
        global $DB, $FULLME;
141
        global $DB, $FULLME;
Línea 142... Línea 142...
142
 
142
 
Línea 231... Línea 231...
231
    }
231
    }
Línea 232... Línea 232...
232
 
232
 
233
    /**
233
    /**
234
     * Test get_course_blocks contents with mathjax.
234
     * Test get_course_blocks contents with mathjax.
235
     */
235
     */
236
    public function test_get_course_blocks_contents_with_mathjax() {
236
    public function test_get_course_blocks_contents_with_mathjax(): void {
Línea 237... Línea 237...
237
        global $DB, $CFG;
237
        global $DB, $CFG;
Línea 238... Línea 238...
238
 
238
 
Línea 308... Línea 308...
308
    }
308
    }
Línea 309... Línea 309...
309
 
309
 
310
    /**
310
    /**
311
     * Test user get default dashboard blocks.
311
     * Test user get default dashboard blocks.
312
     */
312
     */
313
    public function test_get_dashboard_blocks_default_dashboard() {
313
    public function test_get_dashboard_blocks_default_dashboard(): void {
314
        global $PAGE, $DB;
314
        global $PAGE, $DB;
Línea 315... Línea 315...
315
        $this->resetAfterTest(true);
315
        $this->resetAfterTest(true);
316
 
316
 
Línea 357... Línea 357...
357
    }
357
    }
Línea 358... Línea 358...
358
 
358
 
359
    /**
359
    /**
360
     * Test user get default dashboard blocks including a sticky block.
360
     * Test user get default dashboard blocks including a sticky block.
361
     */
361
     */
362
    public function test_get_dashboard_blocks_default_dashboard_including_sticky_block() {
362
    public function test_get_dashboard_blocks_default_dashboard_including_sticky_block(): void {
363
        global $PAGE, $DB;
363
        global $PAGE, $DB;
Línea 364... Línea 364...
364
        $this->resetAfterTest(true);
364
        $this->resetAfterTest(true);
365
 
365
 
Línea 405... Línea 405...
405
    }
405
    }
Línea 406... Línea 406...
406
 
406
 
407
    /**
407
    /**
408
     * Test admin get user's custom dashboard blocks.
408
     * Test admin get user's custom dashboard blocks.
409
     */
409
     */
410
    public function test_get_dashboard_blocks_custom_user_dashboard() {
410
    public function test_get_dashboard_blocks_custom_user_dashboard(): void {
411
        global $PAGE, $DB;
411
        global $PAGE, $DB;
Línea 412... Línea 412...
412
        $this->resetAfterTest(true);
412
        $this->resetAfterTest(true);
413
 
413
 
Línea 456... Línea 456...
456
    }
456
    }
Línea 457... Línea 457...
457
 
457
 
458
    /**
458
    /**
459
     * Test user tries to get other user blocks not having permission.
459
     * Test user tries to get other user blocks not having permission.
460
     */
460
     */
461
    public function test_get_dashboard_blocks_other_user_missing_permissions() {
461
    public function test_get_dashboard_blocks_other_user_missing_permissions(): void {
Línea 462... Línea 462...
462
        $this->resetAfterTest(true);
462
        $this->resetAfterTest(true);
463
 
463
 
Línea 471... Línea 471...
471
    }
471
    }
Línea 472... Línea 472...
472
 
472
 
473
    /**
473
    /**
474
     * Test user get default dashboard blocks for my courses page.
474
     * Test user get default dashboard blocks for my courses page.
475
     */
475
     */
476
    public function test_get_dashboard_blocks_my_courses() {
476
    public function test_get_dashboard_blocks_my_courses(): void {
477
        global $PAGE, $DB;
477
        global $PAGE, $DB;
Línea 478... Línea 478...
478
        $this->resetAfterTest(true);
478
        $this->resetAfterTest(true);
479
 
479
 
Línea 520... Línea 520...
520
    }
520
    }
Línea 521... Línea 521...
521
 
521
 
522
    /**
522
    /**
523
     * Test user passing the wrong page type and getting an exception.
523
     * Test user passing the wrong page type and getting an exception.
524
     */
524
     */
525
    public function test_get_dashboard_blocks_incorrect_page() {
525
    public function test_get_dashboard_blocks_incorrect_page(): void {
526
        global $PAGE;
526
        global $PAGE;
Línea 527... Línea 527...
527
        $this->resetAfterTest(true);
527
        $this->resetAfterTest(true);
528
 
528