Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 107... Línea 107...
107
    }
107
    }
Línea 108... Línea 108...
108
 
108
 
109
    /**
109
    /**
110
     * Test various blog related events.
110
     * Test various blog related events.
111
     */
111
     */
112
    public function test_blog_entry_created_event() {
112
    public function test_blog_entry_created_event(): void {
Línea 113... Línea 113...
113
        global $USER;
113
        global $USER;
114
 
114
 
Línea 141... Línea 141...
141
    }
141
    }
Línea 142... Línea 142...
142
 
142
 
143
    /**
143
    /**
144
     * Tests for event blog_entry_updated.
144
     * Tests for event blog_entry_updated.
145
     */
145
     */
146
    public function test_blog_entry_updated_event() {
146
    public function test_blog_entry_updated_event(): void {
Línea 147... Línea 147...
147
        global $USER;
147
        global $USER;
148
 
148
 
149
        $this->setAdminUser();
149
        $this->setAdminUser();
Línea 172... Línea 172...
172
    }
172
    }
Línea 173... Línea 173...
173
 
173
 
174
    /**
174
    /**
175
     * Tests for event blog_entry_deleted.
175
     * Tests for event blog_entry_deleted.
176
     */
176
     */
177
    public function test_blog_entry_deleted_event() {
177
    public function test_blog_entry_deleted_event(): void {
Línea 178... Línea 178...
178
        global $USER, $DB;
178
        global $USER, $DB;
179
 
179
 
180
        $this->setAdminUser();
180
        $this->setAdminUser();
Línea 203... Línea 203...
203
    }
203
    }
Línea 204... Línea 204...
204
 
204
 
205
    /**
205
    /**
206
     * Tests for event blog_association_deleted.
206
     * Tests for event blog_association_deleted.
207
     */
207
     */
208
    public function test_blog_association_deleted_event() {
208
    public function test_blog_association_deleted_event(): void {
Línea 209... Línea 209...
209
        global $USER;
209
        global $USER;
210
 
210
 
211
        $this->setAdminUser();
211
        $this->setAdminUser();
Línea 248... Línea 248...
248
    }
248
    }
Línea 249... Línea 249...
249
 
249
 
250
    /**
250
    /**
251
     * Tests for event blog_association_created.
251
     * Tests for event blog_association_created.
252
     */
252
     */
253
    public function test_blog_association_created_event() {
253
    public function test_blog_association_created_event(): void {
Línea 254... Línea 254...
254
        global $USER;
254
        global $USER;
255
 
255
 
256
        $this->setAdminUser();
256
        $this->setAdminUser();
Línea 296... Línea 296...
296
    }
296
    }
Línea 297... Línea 297...
297
 
297
 
298
    /**
298
    /**
299
     * Tests for event blog_association_created validations.
299
     * Tests for event blog_association_created validations.
300
     */
300
     */
Línea 301... Línea 301...
301
    public function test_blog_association_created_event_validations() {
301
    public function test_blog_association_created_event_validations(): void {
Línea 302... Línea 302...
302
 
302
 
303
        $this->resetAfterTest();
303
        $this->resetAfterTest();
Línea 354... Línea 354...
354
    }
354
    }
Línea 355... Línea 355...
355
 
355
 
356
    /**
356
    /**
357
     * Tests for event blog_entries_viewed.
357
     * Tests for event blog_entries_viewed.
358
     */
358
     */
Línea 359... Línea 359...
359
    public function test_blog_entries_viewed_event() {
359
    public function test_blog_entries_viewed_event(): void {
Línea 360... Línea 360...
360
 
360
 
361
        $this->setAdminUser();
361
        $this->setAdminUser();
Línea 379... Línea 379...
379
    }
379
    }
Línea 380... Línea 380...
380
 
380
 
381
    /**
381
    /**
382
     * Test comment_created event.
382
     * Test comment_created event.
383
     */
383
     */
384
    public function test_blog_comment_created_event() {
384
    public function test_blog_comment_created_event(): void {
Línea 385... Línea 385...
385
        global $USER, $CFG;
385
        global $USER, $CFG;
Línea 386... Línea 386...
386
 
386
 
Línea 415... Línea 415...
415
    }
415
    }
Línea 416... Línea 416...
416
 
416
 
417
    /**
417
    /**
418
     * Test comment_deleted event.
418
     * Test comment_deleted event.
419
     */
419
     */
420
    public function test_blog_comment_deleted_event() {
420
    public function test_blog_comment_deleted_event(): void {
Línea 421... Línea 421...
421
        global $USER, $CFG;
421
        global $USER, $CFG;
Línea 422... Línea 422...
422
 
422
 
Línea 455... Línea 455...
455
     * Test external blog added event.
455
     * Test external blog added event.
456
     *
456
     *
457
     * There is no external API for this, so the unit test will simply
457
     * There is no external API for this, so the unit test will simply
458
     * create and trigger the event and ensure data is returned as expected.
458
     * create and trigger the event and ensure data is returned as expected.
459
     */
459
     */
460
    public function test_external_blog_added_event() {
460
    public function test_external_blog_added_event(): void {
Línea 461... Línea 461...
461
 
461
 
462
        // Trigger an event: external blog added.
462
        // Trigger an event: external blog added.
463
        $eventparams = array(
463
        $eventparams = array(
464
            'context' => $context = \context_system::instance(),
464
            'context' => $context = \context_system::instance(),
Línea 484... Línea 484...
484
     * Test external blog updated event.
484
     * Test external blog updated event.
485
     *
485
     *
486
     * There is no external API for this, so the unit test will simply
486
     * There is no external API for this, so the unit test will simply
487
     * create and trigger the event and ensure data is returned as expected.
487
     * create and trigger the event and ensure data is returned as expected.
488
     */
488
     */
489
    public function test_external_blog_updated_event() {
489
    public function test_external_blog_updated_event(): void {
Línea 490... Línea 490...
490
 
490
 
491
        // Trigger an event: external blog updated.
491
        // Trigger an event: external blog updated.
492
        $eventparams = array(
492
        $eventparams = array(
493
            'context' => $context = \context_system::instance(),
493
            'context' => $context = \context_system::instance(),
Línea 513... Línea 513...
513
     * Test external blog removed event.
513
     * Test external blog removed event.
514
     *
514
     *
515
     * There is no external API for this, so the unit test will simply
515
     * There is no external API for this, so the unit test will simply
516
     * create and trigger the event and ensure data is returned as expected.
516
     * create and trigger the event and ensure data is returned as expected.
517
     */
517
     */
518
    public function test_external_blog_removed_event() {
518
    public function test_external_blog_removed_event(): void {
Línea 519... Línea 519...
519
 
519
 
520
        // Trigger an event: external blog removed.
520
        // Trigger an event: external blog removed.
521
        $eventparams = array(
521
        $eventparams = array(
522
            'context' => $context = \context_system::instance(),
522
            'context' => $context = \context_system::instance(),
Línea 540... Línea 540...
540
     * Test external blogs viewed event.
540
     * Test external blogs viewed event.
541
     *
541
     *
542
     * There is no external API for this, so the unit test will simply
542
     * There is no external API for this, so the unit test will simply
543
     * create and trigger the event and ensure data is returned as expected.
543
     * create and trigger the event and ensure data is returned as expected.
544
     */
544
     */
545
    public function test_external_blogs_viewed_event() {
545
    public function test_external_blogs_viewed_event(): void {
Línea 546... Línea 546...
546
 
546
 
547
        // Trigger an event: external blogs viewed.
547
        // Trigger an event: external blogs viewed.
548
        $eventparams = array(
548
        $eventparams = array(
549
            'context' => $context = \context_system::instance(),
549
            'context' => $context = \context_system::instance(),