Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 35... Línea 35...
35
 
35
 
36
    public function setUp(): void {
36
    public function setUp(): void {
37
        $this->resetAfterTest(true);
37
        $this->resetAfterTest(true);
Línea 38... Línea 38...
38
    }
38
    }
39
 
39
 
40
    public function test_get_member_info_ordering() {
40
    public function test_get_member_info_ordering(): void {
41
        // Create a conversation with several users.
41
        // Create a conversation with several users.
42
        $user1 = self::getDataGenerator()->create_user();
42
        $user1 = self::getDataGenerator()->create_user();
43
        $user2 = self::getDataGenerator()->create_user();
43
        $user2 = self::getDataGenerator()->create_user();
Línea 63... Línea 63...
63
    }
63
    }
Línea 64... Línea 64...
64
 
64
 
65
    /**
65
    /**
66
     * Test search_get_user_details returns the correct profile data when $CFG->messagingallusers is disabled.
66
     * Test search_get_user_details returns the correct profile data when $CFG->messagingallusers is disabled.
67
     */
67
     */
68
    public function test_search_get_user_details_sitewide_disabled() {
68
    public function test_search_get_user_details_sitewide_disabled(): void {
69
        global $DB;
69
        global $DB;
Línea 70... Línea 70...
70
        set_config('messagingallusers', false);
70
        set_config('messagingallusers', false);
71
 
71
 
Línea 118... Línea 118...
118
    }
118
    }
Línea 119... Línea 119...
119
 
119
 
120
    /**
120
    /**
121
     * Test search_get_user_details returns the correct profile data we limit the data we wish to be returned.
121
     * Test search_get_user_details returns the correct profile data we limit the data we wish to be returned.
122
     */
122
     */
123
    public function test_search_get_user_details_limited_data() {
123
    public function test_search_get_user_details_limited_data(): void {
Línea 124... Línea 124...
124
        set_config('messagingallusers', false);
124
        set_config('messagingallusers', false);
125
 
125
 
126
        // Two students sharing course 1, visible profile within course (no groups).
126
        // Two students sharing course 1, visible profile within course (no groups).
Línea 154... Línea 154...
154
    }
154
    }
Línea 155... Línea 155...
155
 
155
 
156
    /**
156
    /**
157
     * Test search_get_user_details returns the correct profile data when $CFG->messagingallusers is enabled.
157
     * Test search_get_user_details returns the correct profile data when $CFG->messagingallusers is enabled.
158
     */
158
     */
159
    public function test_search_get_user_details_sitewide_enabled() {
159
    public function test_search_get_user_details_sitewide_enabled(): void {
160
        global $DB;
160
        global $DB;
Línea 161... Línea 161...
161
        set_config('messagingallusers', true);
161
        set_config('messagingallusers', true);
162
 
162
 
Línea 214... Línea 214...
214
     * @dataProvider prevent_unclosed_html_tags_data
214
     * @dataProvider prevent_unclosed_html_tags_data
215
     * @param string $text text to preview unclosed html tags.
215
     * @param string $text text to preview unclosed html tags.
216
     * @param string $goodhtml html good structured.
216
     * @param string $goodhtml html good structured.
217
     * @param bool $removebody true if we want to remove tag body.
217
     * @param bool $removebody true if we want to remove tag body.
218
     */
218
     */
219
    public function test_prevent_unclosed_html_tags(string $message, string $goodhtml, bool $removebody) {
219
    public function test_prevent_unclosed_html_tags(string $message, string $goodhtml, bool $removebody): void {
220
        $this->setAdminUser();
220
        $this->setAdminUser();
Línea 221... Línea 221...
221
 
221
 
222
        $html = \core_message\helper::prevent_unclosed_html_tags($message, $removebody);
222
        $html = \core_message\helper::prevent_unclosed_html_tags($message, $removebody);
223
        $this->assertSame($goodhtml, $html);
223
        $this->assertSame($goodhtml, $html);