Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 30... Línea 30...
30
 */
30
 */
31
class area_test extends area_test_base {
31
class area_test extends area_test_base {
32
    /**
32
    /**
33
     * Test for the area assign intro
33
     * Test for the area assign intro
34
     */
34
     */
35
    public function test_assign() {
35
    public function test_assign(): void {
36
        $this->resetAfterTest();
36
        $this->resetAfterTest();
37
        $course = $this->getDataGenerator()->create_course();
37
        $course = $this->getDataGenerator()->create_course();
38
        $assign1 = $this->getDataGenerator()->create_module('assign', array(
38
        $assign1 = $this->getDataGenerator()->create_module('assign', array(
39
            'course' => $course->id, 'name' => 'Test!', 'intro' => '<p>Here we go</p>',
39
            'course' => $course->id, 'name' => 'Test!', 'intro' => '<p>Here we go</p>',
40
            'introformat' => FORMAT_HTML));
40
            'introformat' => FORMAT_HTML));
Línea 85... Línea 85...
85
    }
85
    }
Línea 86... Línea 86...
86
 
86
 
87
    /**
87
    /**
88
     * Test for the area questiontext
88
     * Test for the area questiontext
89
     */
89
     */
90
    public function test_questiontext() {
90
    public function test_questiontext(): void {
91
        $this->resetAfterTest();
91
        $this->resetAfterTest();
92
        /** @var \core_question_generator $generator */
92
        /** @var \core_question_generator $generator */
93
        $generator = $this->getDataGenerator()->get_plugin_generator('core_question');
93
        $generator = $this->getDataGenerator()->get_plugin_generator('core_question');
Línea 145... Línea 145...
145
    }
145
    }
Línea 146... Línea 146...
146
 
146
 
147
    /**
147
    /**
148
     * test for the area questionanswers
148
     * test for the area questionanswers
149
     */
149
     */
150
    public function test_questionanswers() {
150
    public function test_questionanswers(): void {
Línea 151... Línea 151...
151
        global $DB;
151
        global $DB;
152
 
152
 
153
        $this->resetAfterTest();
153
        $this->resetAfterTest();
Línea 189... Línea 189...
189
    }
189
    }
Línea 190... Línea 190...
190
 
190
 
191
    /**
191
    /**
192
     * Test for the areas choice intro and choice options
192
     * Test for the areas choice intro and choice options
193
     */
193
     */
194
    public function test_choice() {
194
    public function test_choice(): void {
195
        global $DB;
195
        global $DB;
196
        $this->resetAfterTest();
196
        $this->resetAfterTest();
197
        $course = $this->getDataGenerator()->create_course();
197
        $course = $this->getDataGenerator()->create_course();
198
        $choice1 = $this->getDataGenerator()->create_module('choice', [
198
        $choice1 = $this->getDataGenerator()->create_module('choice', [