Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 36... Línea 36...
36
    }
36
    }
Línea 37... Línea 37...
37
 
37
 
38
    /**
38
    /**
39
     * Test that template saved with valid content.
39
     * Test that template saved with valid content.
40
     */
40
     */
41
    public function test_template_is_saved() {
41
    public function test_template_is_saved(): void {
42
        global $DB;
42
        global $DB;
43
        $data = new \stdClass();
43
        $data = new \stdClass();
44
        $data->name = 'Test name';
44
        $data->name = 'Test name';
45
        $data->description = 'Test description';
45
        $data->description = 'Test description';
Línea 67... Línea 67...
67
    }
67
    }
Línea 68... Línea 68...
68
 
68
 
69
    /**
69
    /**
70
     * Test that template is not saved with invalid content.
70
     * Test that template is not saved with invalid content.
71
     */
71
     */
72
    public function test_template_is_not_saved_with_invalid_content() {
72
    public function test_template_is_not_saved_with_invalid_content(): void {
73
        $this->expectException(\core\invalid_persistent_exception::class);
73
        $this->expectException(\core\invalid_persistent_exception::class);
Línea 74... Línea 74...
74
        $this->expectExceptionMessage('Invalid SEB config template');
74
        $this->expectExceptionMessage('Invalid SEB config template');
75
 
75
 
Línea 83... Línea 83...
83
    }
83
    }
Línea 84... Línea 84...
84
 
84
 
85
    /**
85
    /**
86
     * Test that a template cannot be deleted when assigned to a quiz.
86
     * Test that a template cannot be deleted when assigned to a quiz.
87
     */
87
     */
88
    public function test_cannot_delete_template_when_assigned_to_quiz() {
88
    public function test_cannot_delete_template_when_assigned_to_quiz(): void {
Línea 89... Línea 89...
89
        global $DB;
89
        global $DB;
90
 
90
 
91
        $data = new \stdClass();
91
        $data = new \stdClass();