Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 39... Línea 39...
39
class externallib_test extends externallib_advanced_testcase {
39
class externallib_test extends externallib_advanced_testcase {
Línea 40... Línea 40...
40
 
40
 
41
    /**
41
    /**
42
     * Test create_notes
42
     * Test create_notes
43
     */
43
     */
Línea 44... Línea 44...
44
    public function test_create_notes() {
44
    public function test_create_notes(): void {
Línea 45... Línea 45...
45
 
45
 
Línea 80... Línea 80...
80
        $this->unassignUserCapability('moodle/notes:manage', $contextid, $roleid);
80
        $this->unassignUserCapability('moodle/notes:manage', $contextid, $roleid);
81
        $this->expectException('\required_capability_exception');
81
        $this->expectException('\required_capability_exception');
82
        $creatednotes = core_notes_external::create_notes($notes);
82
        $creatednotes = core_notes_external::create_notes($notes);
83
    }
83
    }
Línea 84... Línea 84...
84
 
84
 
Línea 85... Línea 85...
85
    public function test_delete_notes() {
85
    public function test_delete_notes(): void {
Línea 86... Línea 86...
86
 
86
 
Línea 132... Línea 132...
132
        $this->expectException('\required_capability_exception');
132
        $this->expectException('\required_capability_exception');
133
        $deletednotes = core_notes_external::delete_notes($dnotes3);
133
        $deletednotes = core_notes_external::delete_notes($dnotes3);
134
        $deletednotes = external_api::clean_returnvalue(core_notes_external::delete_notes_returns(), $deletednotes);
134
        $deletednotes = external_api::clean_returnvalue(core_notes_external::delete_notes_returns(), $deletednotes);
135
    }
135
    }
Línea 136... Línea 136...
136
 
136
 
Línea 137... Línea 137...
137
    public function test_get_notes() {
137
    public function test_get_notes(): void {
Línea 138... Línea 138...
138
 
138
 
Línea 186... Línea 186...
186
        $this->unassignUserCapability('moodle/notes:view', $contextid, $roleid);
186
        $this->unassignUserCapability('moodle/notes:view', $contextid, $roleid);
187
        $this->expectException('\required_capability_exception');
187
        $this->expectException('\required_capability_exception');
188
        $creatednotes = core_notes_external::get_notes($gnotes);
188
        $creatednotes = core_notes_external::get_notes($gnotes);
189
    }
189
    }
Línea 190... Línea 190...
190
 
190
 
Línea 191... Línea 191...
191
    public function test_update_notes() {
191
    public function test_update_notes(): void {
Línea 192... Línea 192...
192
 
192
 
Línea 252... Línea 252...
252
    }
252
    }
Línea 253... Línea 253...
253
 
253
 
254
    /**
254
    /**
255
     * Test get_course_notes
255
     * Test get_course_notes
256
     */
256
     */
257
    public function test_get_course_notes() {
257
    public function test_get_course_notes(): void {
Línea 258... Línea 258...
258
        global $DB, $CFG;
258
        global $DB, $CFG;
259
 
259
 
Línea 410... Línea 410...
410
    }
410
    }
Línea 411... Línea 411...
411
 
411
 
412
    /**
412
    /**
413
     * Test view_notes
413
     * Test view_notes
414
     */
414
     */
415
    public function test_view_notes() {
415
    public function test_view_notes(): void {
Línea 416... Línea 416...
416
        global $DB, $CFG;
416
        global $DB, $CFG;
417
 
417