Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 39 and 311]

(no description)

File Size: 905 lines (38 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

filterlib_test:: (58 methods):
  assert_only_one_filter_globally()
  assert_global_sort_order()
  test_set_filter_globally_on()
  test_set_filter_globally_off()
  test_set_filter_globally_disabled()
  test_global_config_exception_on_invalid_state()
  test_auto_sort_order()
  test_auto_sort_order_enabled()
  test_update_existing_dont_duplicate()
  test_update_reorder_down()
  test_update_reorder_up()
  test_auto_sort_order_change_to_enabled()
  test_auto_sort_order_change_to_disabled()
  test_filter_get_global_states()
  assert_only_one_local_setting()
  assert_no_local_setting()
  test_local_on()
  test_local_off()
  test_local_inherit()
  test_local_invalid_state_throws_exception()
  test_throws_exception_when_setting_global()
  test_local_inherit_deletes_existing()
  assert_only_one_config()
  test_set_new_config()
  test_update_existing_config()
  test_filter_get_local_config()
  setup_available_in_context_tests()
  remove_all_filters_from_config()
  assert_filter_list()
  test_globally_on_is_returned()
  test_globally_off_not_returned()
  test_globally_off_overridden()
  test_globally_on_overridden()
  test_globally_disabled_not_overridden()
  test_single_config_returned()
  test_multi_config_returned()
  test_config_from_other_context_not_returned()
  test_config_from_other_filter_not_returned()
  assert_one_available_filter()
  test_available_in_context_localoverride()
  test_available_in_context_nolocaloverride()
  test_available_in_context_disabled_not_returned()
  test_available_in_context_exception_with_syscontext()
  setup_preload_activities_test()
  assert_matches()
  test_preload()
  test_filter_delete_all_for_filter()
  test_filter_delete_all_for_context()
  test_set()
  test_unset_to_empty()
  test_unset_multi()
  test_filter_manager_instance()
  test_filter_get_active_state_contextid_parameter()
  test_filter_get_active_state_filtername_parameter()
  test_filter_get_active_state_after_change()
  test_filter_get_globally_enabled_default()
  test_filter_get_globally_enabled_after_change()
  test_filter_get_globally_enabled_filters_with_config()


Class: filterlib_test  - X-Ref

Test filters.

Tests for the parts of ../filterlib.php that involve loading the configuration
from, and saving the configuration to, the database.

assert_only_one_filter_globally($filter, $state)   X-Ref
No description

assert_global_sort_order($filters)   X-Ref
No description

test_set_filter_globally_on()   X-Ref
No description

test_set_filter_globally_off()   X-Ref
No description

test_set_filter_globally_disabled()   X-Ref
No description

test_global_config_exception_on_invalid_state()   X-Ref
No description

test_auto_sort_order()   X-Ref
No description

test_auto_sort_order_enabled()   X-Ref
No description

test_update_existing_dont_duplicate()   X-Ref
No description

test_update_reorder_down()   X-Ref
No description

test_update_reorder_up()   X-Ref
No description

test_auto_sort_order_change_to_enabled()   X-Ref
No description

test_auto_sort_order_change_to_disabled()   X-Ref
No description

test_filter_get_global_states()   X-Ref
No description

assert_only_one_local_setting($filter, $contextid, $state)   X-Ref
No description

assert_no_local_setting()   X-Ref
No description

test_local_on()   X-Ref
No description

test_local_off()   X-Ref
No description

test_local_inherit()   X-Ref
No description

test_local_invalid_state_throws_exception()   X-Ref
No description

test_throws_exception_when_setting_global()   X-Ref
No description

test_local_inherit_deletes_existing()   X-Ref
No description

assert_only_one_config($filter, $context, $name, $value)   X-Ref
No description

test_set_new_config()   X-Ref
No description

test_update_existing_config()   X-Ref
No description

test_filter_get_local_config()   X-Ref
No description

setup_available_in_context_tests()   X-Ref
No description

remove_all_filters_from_config()   X-Ref
No description

assert_filter_list($expectedfilters, $filters)   X-Ref
No description

test_globally_on_is_returned()   X-Ref
No description

test_globally_off_not_returned()   X-Ref
No description

test_globally_off_overridden()   X-Ref
No description

test_globally_on_overridden()   X-Ref
No description

test_globally_disabled_not_overridden()   X-Ref
No description

test_single_config_returned()   X-Ref
No description

test_multi_config_returned()   X-Ref
No description

test_config_from_other_context_not_returned()   X-Ref
No description

test_config_from_other_filter_not_returned()   X-Ref
No description

assert_one_available_filter($filter, $localstate, $inheritedstate, $filters)   X-Ref
No description

test_available_in_context_localoverride()   X-Ref
No description

test_available_in_context_nolocaloverride()   X-Ref
No description

test_available_in_context_disabled_not_returned()   X-Ref
No description

test_available_in_context_exception_with_syscontext()   X-Ref
No description

setup_preload_activities_test()   X-Ref
No description

assert_matches($modinfo, $activity1context, $activity2context)   X-Ref
No description

test_preload()   X-Ref
No description

test_filter_delete_all_for_filter()   X-Ref
No description

test_filter_delete_all_for_context()   X-Ref
No description

test_set()   X-Ref
No description

test_unset_to_empty()   X-Ref
No description

test_unset_multi()   X-Ref
No description

test_filter_manager_instance()   X-Ref
No description

test_filter_get_active_state_contextid_parameter()   X-Ref
No description

test_filter_get_active_state_filtername_parameter()   X-Ref
No description

test_filter_get_active_state_after_change()   X-Ref
No description

test_filter_get_globally_enabled_default()   X-Ref
No description

test_filter_get_globally_enabled_after_change()   X-Ref
No description

test_filter_get_globally_enabled_filters_with_config()   X-Ref
No description