Differences Between: [Versions 310 and 403] [Versions 39 and 403]
Unit tests for core_table\local\filter\filterset.
Copyright: | 2020 Andrew Nicols <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU Public License |
File Size: | 545 lines (20 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
filterset_test:: (22 methods):
test_set_join_type()
test_set_join_type_invalid_low()
test_set_join_type_invalid_high()
test_add_filter_value()
test_add_filter_validated_type()
test_add_filter_unexpected_key()
test_add_filter_validated_type_incorrect()
test_add_filter_from_params()
test_add_filter_from_params_unable_to_autoload()
test_add_filter_from_params_invalid()
test_duplicate_filter_value()
test_check_validity_optional_filters_not_specified()
test_check_validity_required_filter()
test_check_validity_filter_missing_required()
test_get_filters()
test_get_filter()
test_get_filter_unknown()
test_get_filter_not_yet_added()
test_get_all_filtertypes()
test_get_all_filtertypes_conflict()
test_has_filter()
get_mocked_filterset()
Class: filterset_test - X-Ref
Unit tests for core_table\local\filter\filterset.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_add_filter_value() X-Ref |
Ensure that adding filter values works as expected. |
test_add_filter_validated_type() X-Ref |
Ensure that it is possible to add a filter of a validated filter type. |
test_add_filter_unexpected_key() X-Ref |
Ensure that it is not possible to add a type which is not expected. |
test_add_filter_validated_type_incorrect() X-Ref |
Ensure that it is not possible to add a validated type where the type is incorrect. |
test_add_filter_from_params() X-Ref |
Ensure that a filter can be added from parameters provided to a web service. |
test_add_filter_from_params_unable_to_autoload() X-Ref |
Ensure that an unknown filter is not added. |
test_add_filter_from_params_invalid() X-Ref |
Ensure that an unknown filter is not added. |
test_duplicate_filter_value() X-Ref |
Ensure that adding a different filter with a different object throws an Exception. |
test_check_validity_optional_filters_not_specified() X-Ref |
Ensure that validating a filterset correctly compares filter types. |
test_check_validity_required_filter() X-Ref |
Ensure that validating a filterset correctly requires required filters. |
test_check_validity_filter_missing_required() X-Ref |
Ensure that validating a filterset excepts correctly when a required fieldset is missing. |
test_get_filters() X-Ref |
Ensure that getting the filters returns a sorted list of filters. |
test_get_filter() X-Ref |
Ensure that getting a singlel filter returns the correct filter. |
test_get_filter_unknown() X-Ref |
Ensure that it is not possible to retrieve an unknown filter. |
test_get_filter_not_yet_added() X-Ref |
Ensure that it is not possible to retrieve a valid filter before it is created. |
test_get_all_filtertypes() X-Ref |
Ensure that the get_all_filtertypes function correctly returns the combined filterset. |
test_get_all_filtertypes_conflict() X-Ref |
Ensure that the get_all_filtertypes function correctly returns the combined filterset. |
test_has_filter() X-Ref |
Ensure that the has_filter function works as expected. |
get_mocked_filterset(array $mockedmethods = []) X-Ref |
Get a mocked copy of the filterset, mocking the specified methods. param: array $mockedmethods anonymous array containing the list of mocked methods return: filterset Mock of the filterset |