Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 52... Línea 52...
52
    }
52
    }
Línea 53... Línea 53...
53
 
53
 
54
    /**
54
    /**
55
     * Test for method enable_plugin()
55
     * Test for method enable_plugin()
56
     */
56
     */
57
    public function test_enable() {
57
    public function test_enable(): void {
58
        global $DB;
58
        global $DB;
59
        $this->resetAfterTest();
59
        $this->resetAfterTest();
60
        $instance = $this->enable_plugin();
60
        $instance = $this->enable_plugin();
61
        $record = $DB->get_record('portfolio_instance', ['plugin' => $this->pluginname]);
61
        $record = $DB->get_record('portfolio_instance', ['plugin' => $this->pluginname]);
Línea 65... Línea 65...
65
    }
65
    }
Línea 66... Línea 66...
66
 
66
 
67
    /**
67
    /**
68
     * Test submitting a form for creating an instance
68
     * Test submitting a form for creating an instance
69
     */
69
     */
70
    public function test_create_form() {
70
    public function test_create_form(): void {
71
        $formdata = ['name' => 'Instance name', 'clientid' => 'CLIENT', 'secret' => 'SECRET'];
71
        $formdata = ['name' => 'Instance name', 'clientid' => 'CLIENT', 'secret' => 'SECRET'];
Línea 72... Línea 72...
72
        portfolio_admin_form::mock_submit($formdata);
72
        portfolio_admin_form::mock_submit($formdata);
73
 
73
 
Línea 84... Línea 84...
84
    }
84
    }
Línea 85... Línea 85...
85
 
85
 
86
    /**
86
    /**
87
     * Test submitting a form for editing an instance
87
     * Test submitting a form for editing an instance
88
     */
88
     */
89
    public function test_edit_form() {
89
    public function test_edit_form(): void {
90
        $this->resetAfterTest();
90
        $this->resetAfterTest();
Línea 91... Línea 91...
91
        $instance = $this->enable_plugin();
91
        $instance = $this->enable_plugin();
92
 
92