Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 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.

Differences Between: [Versions 39 and 310]

(no description)

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

Defines 1 class


Class: filter_test  - X-Ref

Unit tests for core_table\local\filter\filter.

test_constructor(array $args, int $jointype, array $values)   X-Ref
Test that the constructor correctly handles a number of conditions.

param: array $args
param: int $jointype
param: array $values

constructor_provider()   X-Ref
Data provider for the constructor providing a range of valid constructor arguments.

return: array

test_constructor_invalid_joins($jointype)   X-Ref
Test that the constructor throws a relevant exception when passed an invalid join.

param: mixed $jointype

constructor_invalid_join_provider()   X-Ref
Data provider for the constructor providing a range of invalid join types to the constructor.

return: array

test_add_filter_value()   X-Ref
Enusre that adding filter values works as expected.


test_set_join_type()   X-Ref
Ensure that it is possibly to set the join type.


test_set_join_type_invalid_low()   X-Ref
Ensure that it is not possible to provide a value out of bounds when setting the join type.


test_set_join_type_invalid_high()   X-Ref
Ensure that it is not possible to provide a value out of bounds when setting the join type.


test_get_name()   X-Ref
Ensure that the name getter is callable.


filter_value_provider()   X-Ref
Data provider for the countable tests.

return: array

test_countable($values, $count)   X-Ref
Ensure that the filter is countable.

param: array   $values List of context IDs
param: int     $count Expected count

test_filter_iteration()   X-Ref
Ensure that the contextlist_base iterates over the set of contexts.


test_filter_current()   X-Ref
Tests for the count function of a filter.