Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Class: analytics_manager_testcase  - X-Ref

Unit tests for the manager.

test_deleted_context()   X-Ref
test_deleted_context


test_deleted_analysable()   X-Ref
test_deleted_analysable


test_load_default_models_for_component()   X-Ref
Tests for the {@link \core_analytics\manager::load_default_models_for_component()} implementation.


test_load_default_models_for_all_components()   X-Ref
Tests for the {@link \core_analytics\manager::load_default_models_for_all_components()} implementation.


test_validate_models_declaration()   X-Ref
Tests for the successful execution of the {@link \core_analytics\manager::validate_models_declaration()}.


test_validate_models_declaration_exceptions(array $models, string $exception)   X-Ref
Tests for the exceptions thrown by {@link \core_analytics\manager::validate_models_declaration()}.

param: array $models Models declaration.
param: string $exception Expected coding exception message.

validate_models_declaration_exceptions_provider()   X-Ref
Data provider for the {@link self::test_validate_models_declaration_exceptions()}.

return: array of (string)testcase => [(array)models, (string)expected exception message]

load_models_from_fixture_file(string $filename)   X-Ref
Loads models as declared in the given fixture file.

param: string $filename
return: array

test_create_declared_model()   X-Ref
Test the implementation of the {@link \core_analytics\manager::create_declared_model()}.


test_update_default_models_for_component()   X-Ref
Test the implementation of the {@link \core_analytics\manager::update_default_models_for_component()}.


test_get_time_splitting_methods()   X-Ref
test_get_time_splitting_methods description

return: null

test_model_declaration_identifier()   X-Ref
Test the implementation of the {@link \core_analytics\manager::model_declaration_identifier()}.


test_get_declared_target_and_indicators_instances()   X-Ref
Tests for the {@link \core_analytics\manager::get_declared_target_and_indicators_instances()}.


test_get_potential_context_restrictions()   X-Ref
test_get_potential_context_restrictions description