Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 42... Línea 42...
42
    use testcase_helper_trait;
42
    use testcase_helper_trait;
Línea 43... Línea 43...
43
 
43
 
44
    /**
44
    /**
45
     * Presave test
45
     * Presave test
46
     */
46
     */
47
    public function test_process_pre_save() {
47
    public function test_process_pre_save(): void {
48
        $this->resetAfterTest();
48
        $this->resetAfterTest();
49
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance();
49
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance();
50
        $bbformdata = $this->get_form_data_from_instance($bbactivity);
50
        $bbformdata = $this->get_form_data_from_instance($bbactivity);
51
        $bbformdata->participants = '<p>this -&gt; &quot;</p>\n';
51
        $bbformdata->participants = '<p>this -&gt; &quot;</p>\n';
Línea 56... Línea 56...
56
    }
56
    }
Línea 57... Línea 57...
57
 
57
 
58
    /**
58
    /**
59
     * Presave instance
59
     * Presave instance
60
     */
60
     */
61
    public function test_process_pre_save_instance() {
61
    public function test_process_pre_save_instance(): void {
62
        $this->resetAfterTest();
62
        $this->resetAfterTest();
63
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance();
63
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance();
64
        $bbformdata = $this->get_form_data_from_instance($bbactivity);
64
        $bbformdata = $this->get_form_data_from_instance($bbactivity);
65
        $bbformdata->instance = 0;
65
        $bbformdata->instance = 0;
Línea 69... Línea 69...
69
    }
69
    }
Línea 70... Línea 70...
70
 
70
 
71
    /**
71
    /**
72
     * Presave checkboxes
72
     * Presave checkboxes
73
     */
73
     */
74
    public function test_process_pre_save_checkboxes() {
74
    public function test_process_pre_save_checkboxes(): void {
75
        $this->resetAfterTest();
75
        $this->resetAfterTest();
76
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance();
76
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance();
77
        $bbformdata = $this->get_form_data_from_instance($bbactivity);
77
        $bbformdata = $this->get_form_data_from_instance($bbactivity);
78
        unset($bbformdata->wait);
78
        unset($bbformdata->wait);
Línea 83... Línea 83...
83
    }
83
    }
Línea 84... Línea 84...
84
 
84
 
85
    /**
85
    /**
86
     * Presave common
86
     * Presave common
87
     */
87
     */
88
    public function test_process_pre_save_common() {
88
    public function test_process_pre_save_common(): void {
89
        global $CFG;
89
        global $CFG;
Línea 90... Línea 90...
90
        $this->resetAfterTest();
90
        $this->resetAfterTest();
91
 
91
 
Línea 99... Línea 99...
99
    }
99
    }
Línea 100... Línea 100...
100
 
100
 
101
    /**
101
    /**
102
     * Post save
102
     * Post save
103
     */
103
     */
104
    public function test_process_post_save() {
104
    public function test_process_post_save(): void {
Línea 105... Línea 105...
105
        $this->resetAfterTest();
105
        $this->resetAfterTest();
106
 
106
 
107
        $generator = $this->getDataGenerator();
107
        $generator = $this->getDataGenerator();
Línea 132... Línea 132...
132
    }
132
    }
Línea 133... Línea 133...
133
 
133
 
134
    /**
134
    /**
135
     * Post save notification
135
     * Post save notification
136
     */
136
     */
137
    public function test_process_post_save_with_add() {
137
    public function test_process_post_save_with_add(): void {
Línea 138... Línea 138...
138
        $this->resetAfterTest();
138
        $this->resetAfterTest();
139
 
139
 
140
        $generator = $this->getDataGenerator();
140
        $generator = $this->getDataGenerator();
Línea 170... Línea 170...
170
     * Post save
170
     * Post save
171
     *
171
     *
172
     * There was an issue when both the opening time and completion were set
172
     * There was an issue when both the opening time and completion were set
173
     * and the form was saved twice.
173
     * and the form was saved twice.
174
     */
174
     */
175
    public function test_process_post_save_twice_with_completion() {
175
    public function test_process_post_save_twice_with_completion(): void {
176
        $this->resetAfterTest();
176
        $this->resetAfterTest();
Línea 177... Línea 177...
177
 
177
 
178
        $generator = $this->getDataGenerator();
178
        $generator = $this->getDataGenerator();
179
        list($bbactivitycontext, $bbactivitycm, $bbactivity) =
179
        list($bbactivitycontext, $bbactivitycm, $bbactivity) =