Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 89... Línea 89...
89
    }
89
    }
Línea 90... Línea 90...
90
 
90
 
91
    /**
91
    /**
92
     * Test comment_created event.
92
     * Test comment_created event.
93
     */
93
     */
94
    public function test_comment_created() {
94
    public function test_comment_created(): void {
95
        // Triggering and capturing the event.
95
        // Triggering and capturing the event.
96
        $sink = $this->redirectEvents();
96
        $sink = $this->redirectEvents();
97
        $this->comment->add('New comment');
97
        $this->comment->add('New comment');
98
        $events = $sink->get_events();
98
        $events = $sink->get_events();
Línea 107... Línea 107...
107
    }
107
    }
Línea 108... Línea 108...
108
 
108
 
109
    /**
109
    /**
110
     * Test comment_created event.
110
     * Test comment_created event.
111
     */
111
     */
112
    public function test_comment_deleted() {
112
    public function test_comment_deleted(): void {
113
        // Triggering and capturing the event.
113
        // Triggering and capturing the event.
114
        $newcomment = $this->comment->add('New comment to delete');
114
        $newcomment = $this->comment->add('New comment to delete');
115
        $sink = $this->redirectEvents();
115
        $sink = $this->redirectEvents();
116
        $this->comment->delete($newcomment->id);
116
        $this->comment->delete($newcomment->id);