Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Class: manager_test  - X-Ref

Unit tests for the core_analytics 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