Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 53... Línea 53...
53
 
53
 
54
    /**
54
    /**
55
     * Test that get_popup_notifications throws an exception if the user
55
     * Test that get_popup_notifications throws an exception if the user
56
     * doesn't exist.
56
     * doesn't exist.
57
     */
57
     */
58
    public function test_get_popup_notifications_no_user_exception() {
58
    public function test_get_popup_notifications_no_user_exception(): void {
Línea 59... Línea 59...
59
        $this->resetAfterTest(true);
59
        $this->resetAfterTest(true);
60
 
60
 
61
        $this->expectException('moodle_exception');
61
        $this->expectException('moodle_exception');
Línea 62... Línea 62...
62
        $result = message_popup_external::get_popup_notifications(-2132131, false, 0, 0);
62
        $result = message_popup_external::get_popup_notifications(-2132131, false, 0, 0);
63
    }
63
    }
64
 
64
 
65
    /**
65
    /**
66
     * get_popup_notifications should throw exception if user isn't logged in
66
     * get_popup_notifications should throw exception if user isn't logged in
67
     * user.
67
     * user.
Línea 68... Línea 68...
68
     */
68
     */
69
    public function test_get_popup_notifications_access_denied_exception() {
69
    public function test_get_popup_notifications_access_denied_exception(): void {
Línea 78... Línea 78...
78
    }
78
    }
Línea 79... Línea 79...
79
 
79
 
80
    /**
80
    /**
81
     * get_popup_notifications should return notifications for the recipient.
81
     * get_popup_notifications should return notifications for the recipient.
82
     */
82
     */
83
    public function test_get_popup_notifications_as_recipient() {
83
    public function test_get_popup_notifications_as_recipient(): void {
Línea 84... Línea 84...
84
        $this->resetAfterTest(true);
84
        $this->resetAfterTest(true);
85
 
85
 
Línea 113... Línea 113...
113
    }
113
    }
Línea 114... Línea 114...
114
 
114
 
115
    /**
115
    /**
116
     * get_popup_notifications result set should work with limit and offset.
116
     * get_popup_notifications result set should work with limit and offset.
117
     */
117
     */
118
    public function test_get_popup_notification_limit_offset() {
118
    public function test_get_popup_notification_limit_offset(): void {
Línea 119... Línea 119...
119
        $this->resetAfterTest(true);
119
        $this->resetAfterTest(true);
120
 
120
 
Línea 146... Línea 146...
146
    }
146
    }
Línea 147... Línea 147...
147
 
147
 
148
    /**
148
    /**
149
     * get_unread_popup_notification should throw an exception for an invalid user.
149
     * get_unread_popup_notification should throw an exception for an invalid user.
150
     */
150
     */
151
    public function test_get_unread_popup_notification_count_invalid_user_exception() {
151
    public function test_get_unread_popup_notification_count_invalid_user_exception(): void {
Línea 152... Línea 152...
152
        $this->resetAfterTest(true);
152
        $this->resetAfterTest(true);
153
 
153
 
154
        $this->expectException('moodle_exception');
154
        $this->expectException('moodle_exception');
Línea 155... Línea 155...
155
        $result = message_popup_external::get_unread_popup_notification_count(-2132131, 0);
155
        $result = message_popup_external::get_unread_popup_notification_count(-2132131, 0);
156
    }
156
    }
157
 
157
 
158
    /**
158
    /**
159
     * get_unread_popup_notification_count should throw exception if being requested for
159
     * get_unread_popup_notification_count should throw exception if being requested for
160
     * non-logged in user.
160
     * non-logged in user.
Línea 161... Línea 161...
161
     */
161
     */
162
    public function test_get_unread_popup_notification_count_access_denied_exception() {
162
    public function test_get_unread_popup_notification_count_access_denied_exception(): void {
Línea 171... Línea 171...
171
    }
171
    }
Línea 172... Línea 172...
172
 
172
 
173
    /**
173
    /**
174
     * Test get_unread_popup_notification_count.
174
     * Test get_unread_popup_notification_count.
175
     */
175
     */
176
    public function test_get_unread_popup_notification_count() {
176
    public function test_get_unread_popup_notification_count(): void {
Línea 177... Línea 177...
177
        $this->resetAfterTest(true);
177
        $this->resetAfterTest(true);
178
 
178
 
179
        $sender1 = $this->getDataGenerator()->create_user();
179
        $sender1 = $this->getDataGenerator()->create_user();