Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 48... Línea 48...
48
    /**
48
    /**
49
     * Test the questions imported event.
49
     * Test the questions imported event.
50
     * There is no easy way to trigger this event using the API, so the unit test will simply
50
     * There is no easy way to trigger this event using the API, so the unit test will simply
51
     * create and trigger the event and ensure data is returned as expected.
51
     * create and trigger the event and ensure data is returned as expected.
52
     */
52
     */
53
    public function test_questions_imported() {
53
    public function test_questions_imported(): void {
Línea 54... Línea 54...
54
 
54
 
55
        $this->setAdminUser();
55
        $this->setAdminUser();
56
        $course = $this->getDataGenerator()->create_course();
56
        $course = $this->getDataGenerator()->create_course();
Línea 99... Línea 99...
99
    /**
99
    /**
100
     * Test the questions exported event.
100
     * Test the questions exported event.
101
     * There is no easy way to trigger this event using the API, so the unit test will simply
101
     * There is no easy way to trigger this event using the API, so the unit test will simply
102
     * create and trigger the event and ensure data is returned as expected.
102
     * create and trigger the event and ensure data is returned as expected.
103
     */
103
     */
104
    public function test_questions_exported() {
104
    public function test_questions_exported(): void {
Línea 105... Línea 105...
105
 
105
 
106
        $this->setAdminUser();
106
        $this->setAdminUser();
107
        $course = $this->getDataGenerator()->create_course();
107
        $course = $this->getDataGenerator()->create_course();
Línea 148... Línea 148...
148
    }
148
    }
Línea 149... Línea 149...
149
 
149
 
150
    /**
150
    /**
151
     * Test the question created event.
151
     * Test the question created event.
152
     */
152
     */
Línea 153... Línea 153...
153
    public function test_question_created() {
153
    public function test_question_created(): void {
154
 
154
 
Línea 155... Línea 155...
155
        $this->setAdminUser();
155
        $this->setAdminUser();
Línea 174... Línea 174...
174
    }
174
    }
Línea 175... Línea 175...
175
 
175
 
176
    /**
176
    /**
177
     * Test the question deleted event.
177
     * Test the question deleted event.
178
     */
178
     */
Línea 179... Línea 179...
179
    public function test_question_deleted() {
179
    public function test_question_deleted(): void {
180
 
180
 
Línea 181... Línea 181...
181
        $this->setAdminUser();
181
        $this->setAdminUser();
Línea 201... Línea 201...
201
    }
201
    }
Línea 202... Línea 202...
202
 
202
 
203
    /**
203
    /**
204
     * Test the question updated event.
204
     * Test the question updated event.
205
     */
205
     */
Línea 206... Línea 206...
206
    public function test_question_updated() {
206
    public function test_question_updated(): void {
207
 
207
 
208
        global $CFG;
208
        global $CFG;
209
        require_once($CFG->dirroot . '/question/type/description/questiontype.php');
209
        require_once($CFG->dirroot . '/question/type/description/questiontype.php');
Línea 242... Línea 242...
242
    }
242
    }
Línea 243... Línea 243...
243
 
243
 
244
    /**
244
    /**
245
     * Test the question moved event.
245
     * Test the question moved event.
246
     */
246
     */
Línea 247... Línea 247...
247
    public function test_question_moved() {
247
    public function test_question_moved(): void {
248
 
248
 
Línea 249... Línea 249...
249
        $this->setAdminUser();
249
        $this->setAdminUser();
Línea 276... Línea 276...
276
    /**
276
    /**
277
     * Test the question viewed event.
277
     * Test the question viewed event.
278
     * There is no external API for viewing the question, so the unit test will simply
278
     * There is no external API for viewing the question, so the unit test will simply
279
     * create and trigger the event and ensure data is returned as expected.
279
     * create and trigger the event and ensure data is returned as expected.
280
     */
280
     */
281
    public function test_question_viewed() {
281
    public function test_question_viewed(): void {
Línea 282... Línea 282...
282
 
282
 
283
        $this->setAdminUser();
283
        $this->setAdminUser();
Línea 284... Línea 284...
284
        $generator = $this->getDataGenerator()->get_plugin_generator('core_question');
284
        $generator = $this->getDataGenerator()->get_plugin_generator('core_question');