Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 41... Línea 41...
41
    }
41
    }
Línea 42... Línea 42...
42
 
42
 
43
    /**
43
    /**
44
     * Test the field created event.
44
     * Test the field created event.
45
     */
45
     */
46
    public function test_field_created() {
46
    public function test_field_created(): void {
Línea 47... Línea 47...
47
        $this->setAdminUser();
47
        $this->setAdminUser();
48
 
48
 
Línea 76... Línea 76...
76
    }
76
    }
Línea 77... Línea 77...
77
 
77
 
78
    /**
78
    /**
79
     * Test the field updated event.
79
     * Test the field updated event.
80
     */
80
     */
81
    public function test_field_updated() {
81
    public function test_field_updated(): void {
Línea 82... Línea 82...
82
        $this->setAdminUser();
82
        $this->setAdminUser();
83
 
83
 
Línea 112... Línea 112...
112
    }
112
    }
Línea 113... Línea 113...
113
 
113
 
114
    /**
114
    /**
115
     * Test the field deleted event.
115
     * Test the field deleted event.
116
     */
116
     */
117
    public function test_field_deleted() {
117
    public function test_field_deleted(): void {
Línea 118... Línea 118...
118
        $this->setAdminUser();
118
        $this->setAdminUser();
119
 
119
 
Línea 148... Línea 148...
148
    }
148
    }
Línea 149... Línea 149...
149
 
149
 
150
    /**
150
    /**
151
     * Test the record created event.
151
     * Test the record created event.
152
     */
152
     */
153
    public function test_record_created() {
153
    public function test_record_created(): void {
154
        // Create a course we are going to add a data module to.
154
        // Create a course we are going to add a data module to.
Línea 155... Línea 155...
155
        $course = $this->getDataGenerator()->create_course();
155
        $course = $this->getDataGenerator()->create_course();
156
 
156
 
Línea 177... Línea 177...
177
     * Test the record updated event.
177
     * Test the record updated event.
178
     *
178
     *
179
     * There is no external API for updating a record, so the unit test will simply create
179
     * There is no external API for updating a record, so the unit test will simply create
180
     * and trigger the event and ensure the legacy log data is returned as expected.
180
     * and trigger the event and ensure the legacy log data is returned as expected.
181
     */
181
     */
182
    public function test_record_updated() {
182
    public function test_record_updated(): void {
183
        // Create a course we are going to add a data module to.
183
        // Create a course we are going to add a data module to.
184
        $course = $this->getDataGenerator()->create_course();
184
        $course = $this->getDataGenerator()->create_course();
Línea 185... Línea 185...
185
 
185
 
186
        // The generator used to create a data module.
186
        // The generator used to create a data module.
Línea 213... Línea 213...
213
    }
213
    }
Línea 214... Línea 214...
214
 
214
 
215
    /**
215
    /**
216
     * Test the record deleted event.
216
     * Test the record deleted event.
217
     */
217
     */
218
    public function test_record_deleted() {
218
    public function test_record_deleted(): void {
Línea 219... Línea 219...
219
        global $DB;
219
        global $DB;
220
 
220
 
Línea 264... Línea 264...
264
     * Test the template viewed event.
264
     * Test the template viewed event.
265
     *
265
     *
266
     * There is no external API for viewing templates, so the unit test will simply create
266
     * There is no external API for viewing templates, so the unit test will simply create
267
     * and trigger the event and ensure the legacy log data is returned as expected.
267
     * and trigger the event and ensure the legacy log data is returned as expected.
268
     */
268
     */
269
    public function test_template_viewed() {
269
    public function test_template_viewed(): void {
270
        // Create a course we are going to add a data module to.
270
        // Create a course we are going to add a data module to.
271
        $course = $this->getDataGenerator()->create_course();
271
        $course = $this->getDataGenerator()->create_course();
Línea 272... Línea 272...
272
 
272
 
273
        // The generator used to create a data module.
273
        // The generator used to create a data module.
Línea 302... Línea 302...
302
     * Test the template updated event.
302
     * Test the template updated event.
303
     *
303
     *
304
     * There is no external API for updating a template, so the unit test will simply create
304
     * There is no external API for updating a template, so the unit test will simply create
305
     * and trigger the event and ensure the legacy log data is returned as expected.
305
     * and trigger the event and ensure the legacy log data is returned as expected.
306
     */
306
     */
307
    public function test_template_updated() {
307
    public function test_template_updated(): void {
308
        // Create a course we are going to add a data module to.
308
        // Create a course we are going to add a data module to.
309
        $course = $this->getDataGenerator()->create_course();
309
        $course = $this->getDataGenerator()->create_course();
Línea 310... Línea 310...
310
 
310
 
311
        // The generator used to create a data module.
311
        // The generator used to create a data module.
Línea 408... Línea 408...
408
     */
408
     */
409
    public function test_importing_events(
409
    public function test_importing_events(
410
        array $currentfields,
410
        array $currentfields,
411
        array $newfields,
411
        array $newfields,
412
        array $expected
412
        array $expected
413
    ) {
413
    ): void {
Línea 414... Línea 414...
414
 
414
 
Línea 415... Línea 415...
415
        global $USER;
415
        global $USER;
416
 
416