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
    }
38
    }
Línea 39... Línea 39...
39
 
39
 
40
    /**
40
    /**
41
     * Test for the field_controller::__construct function.
41
     * Test for the field_controller::__construct function.
42
     */
42
     */
43
    public function test_constructor() {
43
    public function test_constructor(): void {
Línea 44... Línea 44...
44
        $this->resetAfterTest();
44
        $this->resetAfterTest();
45
 
45
 
46
        $c = category_controller::create(0, (object)['component' => 'core_course', 'area' => 'course', 'itemid' => 0]);
46
        $c = category_controller::create(0, (object)['component' => 'core_course', 'area' => 'course', 'itemid' => 0]);
Línea 62... Línea 62...
62
    }
62
    }
Línea 63... Línea 63...
63
 
63
 
64
    /**
64
    /**
65
     * Test for function \core_customfield\field_controller::create() in case of wrong parameters
65
     * Test for function \core_customfield\field_controller::create() in case of wrong parameters
66
     */
66
     */
67
    public function test_constructor_errors() {
67
    public function test_constructor_errors(): void {
68
        global $DB;
68
        global $DB;
Línea 69... Línea 69...
69
        $this->resetAfterTest();
69
        $this->resetAfterTest();
70
 
70
 
Línea 163... Línea 163...
163
    /**
163
    /**
164
     * Tests for behaviour of:
164
     * Tests for behaviour of:
165
     * \core_customfield\category_controller::save()
165
     * \core_customfield\category_controller::save()
166
     * \core_customfield\category_controller::get()
166
     * \core_customfield\category_controller::get()
167
     */
167
     */
168
    public function test_create_category() {
168
    public function test_create_category(): void {
169
        $this->resetAfterTest();
169
        $this->resetAfterTest();
Línea 170... Línea 170...
170
 
170
 
171
        // Create the category.
171
        // Create the category.
172
        $lpg = $this->get_generator();
172
        $lpg = $this->get_generator();
Línea 192... Línea 192...
192
    }
192
    }
Línea 193... Línea 193...
193
 
193
 
194
    /**
194
    /**
195
     * Tests for \core_customfield\category_controller::set() behaviour.
195
     * Tests for \core_customfield\category_controller::set() behaviour.
196
     */
196
     */
197
    public function test_rename_category() {
197
    public function test_rename_category(): void {
Línea 198... Línea 198...
198
        $this->resetAfterTest();
198
        $this->resetAfterTest();
199
 
199
 
200
        // Create the category.
200
        // Create the category.
Línea 217... Línea 217...
217
    }
217
    }
Línea 218... Línea 218...
218
 
218
 
219
    /**
219
    /**
220
     * Tests for \core_customfield\category_controller::delete() behaviour.
220
     * Tests for \core_customfield\category_controller::delete() behaviour.
221
     */
221
     */
222
    public function test_delete_category() {
222
    public function test_delete_category(): void {
Línea 223... Línea 223...
223
        $this->resetAfterTest();
223
        $this->resetAfterTest();
224
 
224
 
225
        // Create the category.
225
        // Create the category.