Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 34... Línea 34...
34
class manager_test extends \advanced_testcase {
34
class manager_test extends \advanced_testcase {
Línea 35... Línea 35...
35
 
35
 
36
    /**
36
    /**
37
     * test_deleted_context
37
     * test_deleted_context
38
     */
38
     */
39
    public function test_deleted_context() {
39
    public function test_deleted_context(): void {
Línea 40... Línea 40...
40
        global $DB;
40
        global $DB;
41
 
41
 
42
        $this->resetAfterTest(true);
42
        $this->resetAfterTest(true);
Línea 101... Línea 101...
101
    }
101
    }
Línea 102... Línea 102...
102
 
102
 
103
    /**
103
    /**
104
     * test_deleted_analysable
104
     * test_deleted_analysable
105
     */
105
     */
106
    public function test_deleted_analysable() {
106
    public function test_deleted_analysable(): void {
Línea 107... Línea 107...
107
        global $DB;
107
        global $DB;
108
 
108
 
109
        $this->resetAfterTest(true);
109
        $this->resetAfterTest(true);
Línea 148... Línea 148...
148
    }
148
    }
Línea 149... Línea 149...
149
 
149
 
150
    /**
150
    /**
151
     * Tests for the {@link \core_analytics\manager::load_default_models_for_component()} implementation.
151
     * Tests for the {@link \core_analytics\manager::load_default_models_for_component()} implementation.
152
     */
152
     */
153
    public function test_load_default_models_for_component() {
153
    public function test_load_default_models_for_component(): void {
Línea 154... Línea 154...
154
        $this->resetAfterTest();
154
        $this->resetAfterTest();
155
 
155
 
Línea 170... Línea 170...
170
    }
170
    }
Línea 171... Línea 171...
171
 
171
 
172
    /**
172
    /**
173
     * Tests for the {@link \core_analytics\manager::load_default_models_for_all_components()} implementation.
173
     * Tests for the {@link \core_analytics\manager::load_default_models_for_all_components()} implementation.
174
     */
174
     */
175
    public function test_load_default_models_for_all_components() {
175
    public function test_load_default_models_for_all_components(): void {
Línea 176... Línea 176...
176
        $this->resetAfterTest();
176
        $this->resetAfterTest();
Línea 177... Línea 177...
177
 
177
 
Línea 184... Línea 184...
184
    }
184
    }
Línea 185... Línea 185...
185
 
185
 
186
    /**
186
    /**
187
     * Tests for the successful execution of the {@link \core_analytics\manager::validate_models_declaration()}.
187
     * Tests for the successful execution of the {@link \core_analytics\manager::validate_models_declaration()}.
188
     */
188
     */
189
    public function test_validate_models_declaration() {
189
    public function test_validate_models_declaration(): void {
Línea 190... Línea 190...
190
        $this->resetAfterTest();
190
        $this->resetAfterTest();
191
 
191
 
192
        // This is expected to run without an exception.
192
        // This is expected to run without an exception.
Línea 199... Línea 199...
199
     *
199
     *
200
     * @dataProvider validate_models_declaration_exceptions_provider
200
     * @dataProvider validate_models_declaration_exceptions_provider
201
     * @param array $models Models declaration.
201
     * @param array $models Models declaration.
202
     * @param string $exception Expected coding exception message.
202
     * @param string $exception Expected coding exception message.
203
     */
203
     */
204
    public function test_validate_models_declaration_exceptions(array $models, string $exception) {
204
    public function test_validate_models_declaration_exceptions(array $models, string $exception): void {
205
        $this->resetAfterTest();
205
        $this->resetAfterTest();
Línea 206... Línea 206...
206
 
206
 
207
        $this->expectException(\coding_exception::class);
207
        $this->expectException(\coding_exception::class);
208
        $this->expectExceptionMessage($exception);
208
        $this->expectExceptionMessage($exception);
Línea 264... Línea 264...
264
    }
264
    }
Línea 265... Línea 265...
265
 
265
 
266
    /**
266
    /**
267
     * Test the implementation of the {@link \core_analytics\manager::create_declared_model()}.
267
     * Test the implementation of the {@link \core_analytics\manager::create_declared_model()}.
268
     */
268
     */
269
    public function test_create_declared_model() {
269
    public function test_create_declared_model(): void {
Línea 270... Línea 270...
270
        global $DB;
270
        global $DB;
271
 
271
 
Línea 350... Línea 350...
350
    }
350
    }
Línea 351... Línea 351...
351
 
351
 
352
    /**
352
    /**
353
     * Test the implementation of the {@link \core_analytics\manager::update_default_models_for_component()}.
353
     * Test the implementation of the {@link \core_analytics\manager::update_default_models_for_component()}.
354
     */
354
     */
Línea 355... Línea 355...
355
    public function test_update_default_models_for_component() {
355
    public function test_update_default_models_for_component(): void {
356
 
356
 
Línea 357... Línea 357...
357
        $this->resetAfterTest();
357
        $this->resetAfterTest();
Línea 400... Línea 400...
400
 
400
 
401
    /**
401
    /**
402
     * test_get_time_splitting_methods description
402
     * test_get_time_splitting_methods description
403
     * @return null
403
     * @return null
404
     */
404
     */
405
    public function test_get_time_splitting_methods() {
405
    public function test_get_time_splitting_methods(): void {
Línea 406... Línea 406...
406
        $this->resetAfterTest(true);
406
        $this->resetAfterTest(true);
407
 
407
 
408
        $all = \core_analytics\manager::get_all_time_splittings();
408
        $all = \core_analytics\manager::get_all_time_splittings();
Línea 426... Línea 426...
426
    }
426
    }
Línea 427... Línea 427...
427
 
427
 
428
    /**
428
    /**
429
     * Test the implementation of the {@link \core_analytics\manager::model_declaration_identifier()}.
429
     * Test the implementation of the {@link \core_analytics\manager::model_declaration_identifier()}.
430
     */
430
     */
Línea 431... Línea 431...
431
    public function test_model_declaration_identifier() {
431
    public function test_model_declaration_identifier(): void {
432
 
432
 
433
        $noteaching1 = $this->load_models_from_fixture_file('no_teaching');
433
        $noteaching1 = $this->load_models_from_fixture_file('no_teaching');
Línea 469... Línea 469...
469
    }
469
    }
Línea 470... Línea 470...
470
 
470
 
471
    /**
471
    /**
472
     * Tests for the {@link \core_analytics\manager::get_declared_target_and_indicators_instances()}.
472
     * Tests for the {@link \core_analytics\manager::get_declared_target_and_indicators_instances()}.
473
     */
473
     */
474
    public function test_get_declared_target_and_indicators_instances() {
474
    public function test_get_declared_target_and_indicators_instances(): void {
Línea 475... Línea 475...
475
        $this->resetAfterTest();
475
        $this->resetAfterTest();
Línea 476... Línea 476...
476
 
476
 
Línea 484... Línea 484...
484
    }
484
    }
Línea 485... Línea 485...
485
 
485
 
486
    /**
486
    /**
487
     * test_get_potential_context_restrictions description
487
     * test_get_potential_context_restrictions description
488
     */
488
     */
489
    public function test_get_potential_context_restrictions() {
489
    public function test_get_potential_context_restrictions(): void {
Línea 490... Línea 490...
490
        $this->resetAfterTest();
490
        $this->resetAfterTest();
491
 
491