Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 42... Línea 42...
42
    }
42
    }
Línea 43... Línea 43...
43
 
43
 
44
    /**
44
    /**
45
     * Test that triggering the user_info_category_created event works as expected.
45
     * Test that triggering the user_info_category_created event works as expected.
46
     */
46
     */
47
    public function test_user_info_category_created_event() {
47
    public function test_user_info_category_created_event(): void {
48
        // Create a new profile category.
48
        // Create a new profile category.
Línea 49... Línea 49...
49
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
49
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
50
 
50
 
Línea 65... Línea 65...
65
    }
65
    }
Línea 66... Línea 66...
66
 
66
 
67
    /**
67
    /**
68
     * Test that moving a user info category triggers an updated event.
68
     * Test that moving a user info category triggers an updated event.
69
     */
69
     */
70
    public function test_user_info_category_updated_event() {
70
    public function test_user_info_category_updated_event(): void {
Línea 71... Línea 71...
71
        global $DB;
71
        global $DB;
72
 
72
 
73
        // Create new profile categories.
73
        // Create new profile categories.
Línea 96... Línea 96...
96
    }
96
    }
Línea 97... Línea 97...
97
 
97
 
98
    /**
98
    /**
99
     * Test that deleting a user info category triggers a delete event.
99
     * Test that deleting a user info category triggers a delete event.
100
     */
100
     */
101
    public function test_user_info_category_deleted_event() {
101
    public function test_user_info_category_deleted_event(): void {
102
        // Create new profile categories.
102
        // Create new profile categories.
103
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
103
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
Línea 104... Línea 104...
104
        $cat2 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category 2']);
104
        $cat2 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category 2']);
Línea 120... Línea 120...
120
    }
120
    }
Línea 121... Línea 121...
121
 
121
 
122
    /**
122
    /**
123
     * Test that creating a user info field triggers a create event.
123
     * Test that creating a user info field triggers a create event.
124
     */
124
     */
125
    public function test_user_info_field_created_event() {
125
    public function test_user_info_field_created_event(): void {
Línea 126... Línea 126...
126
        global $DB;
126
        global $DB;
127
 
127
 
Línea 164... Línea 164...
164
    }
164
    }
Línea 165... Línea 165...
165
 
165
 
166
    /**
166
    /**
167
     * Test that updating a user info field triggers an update event.
167
     * Test that updating a user info field triggers an update event.
168
     */
168
     */
169
    public function test_user_info_field_updated_event() {
169
    public function test_user_info_field_updated_event(): void {
170
        // Create a new profile category.
170
        // Create a new profile category.
Línea 171... Línea 171...
171
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
171
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
172
 
172
 
Línea 199... Línea 199...
199
    }
199
    }
Línea 200... Línea 200...
200
 
200
 
201
    /**
201
    /**
202
     * Test that moving a field triggers update events.
202
     * Test that moving a field triggers update events.
203
     */
203
     */
204
    public function test_user_info_field_updated_event_move_field() {
204
    public function test_user_info_field_updated_event_move_field(): void {
205
        // Create a new profile category.
205
        // Create a new profile category.
Línea 206... Línea 206...
206
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
206
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
207
 
207
 
Línea 249... Línea 249...
249
 
249
 
250
    /**
250
    /**
251
     * Test that when we delete a category that contains a field, that the field being moved to
251
     * Test that when we delete a category that contains a field, that the field being moved to
252
     * another category triggers an update event.
252
     * another category triggers an update event.
253
     */
253
     */
254
    public function test_user_info_field_updated_event_delete_category() {
254
    public function test_user_info_field_updated_event_delete_category(): void {
255
        // Create profile categories.
255
        // Create profile categories.
256
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
256
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
Línea 257... Línea 257...
257
        $cat2 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
257
        $cat2 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
Línea 284... Línea 284...
284
    }
284
    }
Línea 285... Línea 285...
285
 
285
 
286
    /**
286
    /**
287
     * Test that deleting a user info field triggers a delete event.
287
     * Test that deleting a user info field triggers a delete event.
288
     */
288
     */
289
    public function test_user_info_field_deleted_event() {
289
    public function test_user_info_field_deleted_event(): void {
290
        // Create a new profile category.
290
        // Create a new profile category.
Línea 291... Línea 291...
291
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
291
        $cat1 = $this->getDataGenerator()->create_custom_profile_field_category(['name' => 'Example category']);
292
 
292