Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 39... Línea 39...
39
    use \quiz_question_helper_test_trait;
39
    use \quiz_question_helper_test_trait;
Línea 40... Línea 40...
40
 
40
 
41
    /**
41
    /**
42
     * Constructor test.
42
     * Constructor test.
43
     */
43
     */
44
    public function test_constructor() {
44
    public function test_constructor(): void {
Línea 45... Línea 45...
45
        global $SITE;
45
        global $SITE;
46
 
46
 
Línea 91... Línea 91...
91
        $rcp = $rc->getProperty('record');
91
        $rcp = $rc->getProperty('record');
92
        $record = $rcp->getValue($randomslot);
92
        $record = $rcp->getValue($randomslot);
93
        $this->assertEquals(1, $record->maxmark);
93
        $this->assertEquals(1, $record->maxmark);
94
    }
94
    }
Línea 95... Línea 95...
95
 
95
 
96
    public function test_get_quiz_quiz() {
96
    public function test_get_quiz_quiz(): void {
Línea 97... Línea 97...
97
        global $SITE, $DB;
97
        global $SITE, $DB;
98
 
98
 
Línea 127... Línea 127...
127
        unset($quiz->cmid);
127
        unset($quiz->cmid);
Línea 128... Línea 128...
128
 
128
 
129
        $this->assertEquals($quiz, $randomslot->get_quiz());
129
        $this->assertEquals($quiz, $randomslot->get_quiz());
Línea 130... Línea 130...
130
    }
130
    }
131
 
131
 
Línea 132... Línea 132...
132
    public function test_set_quiz() {
132
    public function test_set_quiz(): void {
133
        global $SITE, $DB;
133
        global $SITE, $DB;
Línea 205... Línea 205...
205
        }
205
        }
Línea 206... Línea 206...
206
 
206
 
207
        return [$randomslot, $tags];
207
        return [$randomslot, $tags];
Línea 208... Línea 208...
208
    }
208
    }
209
 
209
 
210
    public function test_set_tags_filter() {
210
    public function test_set_tags_filter(): void {
Línea 211... Línea 211...
211
        $this->resetAfterTest();
211
        $this->resetAfterTest();
Línea 224... Línea 224...
224
 
224
 
225
        $this->assertEquals([$tags['foo']->id, $tags['bar']->id],
225
        $this->assertEquals([$tags['foo']->id, $tags['bar']->id],
226
            (array)json_decode($tagspropery)->filters->qtagids->values);
226
            (array)json_decode($tagspropery)->filters->qtagids->values);
Línea 227... Línea 227...
227
    }
227
    }
228
 
228
 
Línea 229... Línea 229...
229
    public function test_insert() {
229
    public function test_insert(): void {
230
        global $SITE;
230
        global $SITE;