Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 52... Línea 52...
52
     * Tests for \core_customfield\api::move_category() behaviour.
52
     * Tests for \core_customfield\api::move_category() behaviour.
53
     *
53
     *
54
     * This replicates what is happening when categories are moved
54
     * This replicates what is happening when categories are moved
55
     * in the interface using drag-drop.
55
     * in the interface using drag-drop.
56
     */
56
     */
57
    public function test_move_category() {
57
    public function test_move_category(): void {
58
        $this->resetAfterTest();
58
        $this->resetAfterTest();
Línea 59... Línea 59...
59
 
59
 
60
        // Create the categories.
60
        // Create the categories.
61
        $params = ['component' => 'core_course', 'area' => 'course', 'itemid' => 0];
61
        $params = ['component' => 'core_course', 'area' => 'course', 'itemid' => 0];
Línea 103... Línea 103...
103
    }
103
    }
Línea 104... Línea 104...
104
 
104
 
105
    /**
105
    /**
106
     * Tests for \core_customfield\api::get_categories_with_fields() behaviour.
106
     * Tests for \core_customfield\api::get_categories_with_fields() behaviour.
107
     */
107
     */
108
    public function test_get_categories_with_fields() {
108
    public function test_get_categories_with_fields(): void {
Línea 109... Línea 109...
109
        $this->resetAfterTest();
109
        $this->resetAfterTest();
110
 
110
 
111
        // Create the categories.
111
        // Create the categories.
Línea 139... Línea 139...
139
    }
139
    }
Línea 140... Línea 140...
140
 
140
 
141
    /**
141
    /**
142
     * Test for functions api::save_category() and rename_category)
142
     * Test for functions api::save_category() and rename_category)
143
     */
143
     */
144
    public function test_save_category() {
144
    public function test_save_category(): void {
Línea 145... Línea 145...
145
        $this->resetAfterTest();
145
        $this->resetAfterTest();
146
 
146
 
147
        $params = ['component' => 'core_course', 'area' => 'course', 'itemid' => 0, 'name' => 'Cat1',
147
        $params = ['component' => 'core_course', 'area' => 'course', 'itemid' => 0, 'name' => 'Cat1',
Línea 174... Línea 174...
174
    }
174
    }
Línea 175... Línea 175...
175
 
175
 
176
    /**
176
    /**
177
     * Test for function handler::create_category
177
     * Test for function handler::create_category
178
     */
178
     */
179
    public function test_create_category() {
179
    public function test_create_category(): void {
Línea 180... Línea 180...
180
        $this->resetAfterTest();
180
        $this->resetAfterTest();
181
 
181
 
182
        $handler = \core_course\customfield\course_handler::create();
182
        $handler = \core_course\customfield\course_handler::create();
Línea 198... Línea 198...
198
    }
198
    }
Línea 199... Línea 199...
199
 
199
 
200
    /**
200
    /**
201
     * Tests for \core_customfield\api::delete_category() behaviour.
201
     * Tests for \core_customfield\api::delete_category() behaviour.
202
     */
202
     */
203
    public function test_delete_category_with_fields() {
203
    public function test_delete_category_with_fields(): void {
Línea 204... Línea 204...
204
        $this->resetAfterTest();
204
        $this->resetAfterTest();
205
 
205
 
206
        global $DB;
206
        global $DB;