Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 38... Línea 38...
38
class services_content_item_service_test extends \advanced_testcase {
38
class services_content_item_service_test extends \advanced_testcase {
Línea 39... Línea 39...
39
 
39
 
40
    /**
40
    /**
41
     * Test confirming that content items are returned by the service.
41
     * Test confirming that content items are returned by the service.
42
     */
42
     */
43
    public function test_get_content_items_for_user_in_course_basic() {
43
    public function test_get_content_items_for_user_in_course_basic(): void {
Línea 44... Línea 44...
44
        $this->resetAfterTest();
44
        $this->resetAfterTest();
45
 
45
 
46
        // Create a user in a course.
46
        // Create a user in a course.
Línea 63... Línea 63...
63
    }
63
    }
Línea 64... Línea 64...
64
 
64
 
65
    /**
65
    /**
66
     * Test confirming that access control is performed when asking the service to return content items for a user in a course.
66
     * Test confirming that access control is performed when asking the service to return content items for a user in a course.
67
     */
67
     */
68
    public function test_get_content_items_for_user_in_course_permissions() {
68
    public function test_get_content_items_for_user_in_course_permissions(): void {
69
        $this->resetAfterTest();
69
        $this->resetAfterTest();
Línea 70... Línea 70...
70
        global $DB;
70
        global $DB;
71
 
71
 
Línea 87... Línea 87...
87
    }
87
    }
Línea 88... Línea 88...
88
 
88
 
89
    /**
89
    /**
90
     * Test confirming that params can be added to the content item's link.
90
     * Test confirming that params can be added to the content item's link.
91
     */
91
     */
92
    public function test_get_content_item_for_user_in_course_link_params() {
92
    public function test_get_content_item_for_user_in_course_link_params(): void {
Línea 93... Línea 93...
93
        $this->resetAfterTest();
93
        $this->resetAfterTest();
94
 
94
 
95
        // Create a user in a course.
95
        // Create a user in a course.
Línea 105... Línea 105...
105
    }
105
    }
Línea 106... Línea 106...
106
 
106
 
107
    /**
107
    /**
108
     * Test confirming that all content items can be fetched irrespective of permissions.
108
     * Test confirming that all content items can be fetched irrespective of permissions.
109
     */
109
     */
110
    public function test_get_all_content_items() {
110
    public function test_get_all_content_items(): void {
111
        $this->resetAfterTest();
111
        $this->resetAfterTest();
Línea 112... Línea 112...
112
        global $DB;
112
        global $DB;
113
 
113
 
Línea 145... Línea 145...
145
    }
145
    }
Línea 146... Línea 146...
146
 
146
 
147
    /**
147
    /**
148
     * Test confirming that content items which title match a certain pattern can be fetched irrespective of permissions.
148
     * Test confirming that content items which title match a certain pattern can be fetched irrespective of permissions.
149
     */
149
     */
150
    public function test_get_content_items_by_name_pattern() {
150
    public function test_get_content_items_by_name_pattern(): void {
Línea 151... Línea 151...
151
        $this->resetAfterTest();
151
        $this->resetAfterTest();
152
 
152
 
153
        // Create a user in a course.
153
        // Create a user in a course.
Línea 174... Línea 174...
174
    }
174
    }
Línea 175... Línea 175...
175
 
175
 
176
    /**
176
    /**
177
     * Test confirming that a content item can be added to a user's favourites.
177
     * Test confirming that a content item can be added to a user's favourites.
178
     */
178
     */
179
    public function test_add_to_user_favourites() {
179
    public function test_add_to_user_favourites(): void {
Línea 180... Línea 180...
180
        $this->resetAfterTest();
180
        $this->resetAfterTest();
181
 
181
 
182
        // Create a user in a course.
182
        // Create a user in a course.
Línea 204... Línea 204...
204
    }
204
    }
Línea 205... Línea 205...
205
 
205
 
206
    /**
206
    /**
207
     * Test verifying that content items can be removed from a user's favourites.
207
     * Test verifying that content items can be removed from a user's favourites.
208
     */
208
     */
209
    public function test_remove_from_user_favourites() {
209
    public function test_remove_from_user_favourites(): void {
Línea 210... Línea 210...
210
        $this->resetAfterTest();
210
        $this->resetAfterTest();
211
 
211
 
212
        // Create a user in a course.
212
        // Create a user in a course.
Línea 236... Línea 236...
236
    }
236
    }
Línea 237... Línea 237...
237
 
237
 
238
    /**
238
    /**
239
     * Test that toggling a recommendation works as anticipated.
239
     * Test that toggling a recommendation works as anticipated.
240
     */
240
     */
241
    public function test_toggle_recommendation() {
241
    public function test_toggle_recommendation(): void {
Línea 242... Línea 242...
242
        $this->resetAfterTest();
242
        $this->resetAfterTest();
243
 
243
 
244
        // Create a user in a course.
244
        // Create a user in a course.