Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 33... Línea 33...
33
        // Survey module is disabled by default, enable it for testing.
33
        // Survey module is disabled by default, enable it for testing.
34
        $manager = \core_plugin_manager::resolve_plugininfo_class('mod');
34
        $manager = \core_plugin_manager::resolve_plugininfo_class('mod');
35
        $manager::enable_plugin('survey', 1);
35
        $manager::enable_plugin('survey', 1);
36
    }
36
    }
Línea 37... Línea 37...
37
 
37
 
38
    public function test_create_instance() {
38
    public function test_create_instance(): void {
39
        global $DB;
39
        global $DB;
40
        $this->resetAfterTest();
40
        $this->resetAfterTest();
Línea 41... Línea 41...
41
        $this->setAdminUser();
41
        $this->setAdminUser();
Línea 53... Línea 53...
53
        $records = $DB->get_records('survey', array('course' => $course->id), 'id');
53
        $records = $DB->get_records('survey', array('course' => $course->id), 'id');
54
        $this->assertEquals(2, count($records));
54
        $this->assertEquals(2, count($records));
55
        $this->assertEquals('Another survey', $records[$survey->id]->name);
55
        $this->assertEquals('Another survey', $records[$survey->id]->name);
56
    }
56
    }
Línea 57... Línea 57...
57
 
57
 
58
    public function test_create_instance_with_template() {
58
    public function test_create_instance_with_template(): void {
59
        global $DB;
59
        global $DB;
60
        $this->resetAfterTest();
60
        $this->resetAfterTest();
Línea 61... Línea 61...
61
        $this->setAdminUser();
61
        $this->setAdminUser();