| [ Index ] |
PHP Cross Reference of Moodle 310 |
[Source view] [Print] [Project Stats]
Unit tests for all Privacy Providers.
| Copyright: | 2018 Andrew Nicols <andrew@nicols.co.uk> |
| License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
| File Size: | 331 lines (13 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
provider_testcase:: (12 methods):
get_component_list()
test_null_provider()
null_provider_provider()
test_metadata_provider()
test_all_providers_compliant()
test_component_understands_deleted_users()
test_userdata_provider_implements_userlist()
metadata_provider_provider()
is_user_data_provider()
component_implements()
get_userid_fields()
test_table_coverage()
Class: provider_testcase - X-Ref
Unit tests for all Privacy Providers.| get_component_list() X-Ref |
| Returns a list of frankenstyle names of core components (plugins and subsystems). return: array the array of frankenstyle component names with the relevant class name. |
| test_null_provider($component, $classname) X-Ref |
| Test that the specified null_provider works as expected. param: string $component The name of the component. param: string $classname The name of the class for privacy |
| null_provider_provider() X-Ref |
| Data provider for the null_provider tests. return: array |
| test_metadata_provider($component, $classname) X-Ref |
| Test that the specified metadata_provider works as expected. param: string $component The name of the component. param: string $classname The name of the class for privacy |
| test_all_providers_compliant($component, $classname) X-Ref |
| Test that all providers implement some form of compliant provider. param: string $component frankenstyle component name, e.g. 'mod_assign' param: string $classname the fully qualified provider classname |
| test_component_understands_deleted_users($component) X-Ref |
| Ensure that providers do not throw an error when processing a deleted user. param: string $component |
| test_userdata_provider_implements_userlist($component) X-Ref |
| Ensure that providers do not throw an error when processing a deleted user. param: string $component |
| metadata_provider_provider() X-Ref |
| Data provider for the metadata\provider tests. return: array |
| is_user_data_provider() X-Ref |
| List of providers which implement the core_user_data_provider. return: array |
| component_implements($providerclass, $interface) X-Ref |
| Checks whether the component's provider class implements the specified interface, either directly or as a grandchild. param: string $providerclass The name of the class to test. param: string $interface the name of the interface we want to check. return: bool Whether the class implements the interface. |
| get_userid_fields(xmldb_table $table) X-Ref |
| Finds user fields in a table Returns fields that have foreign key to user table and fields that are named 'userid'. param: xmldb_table $table return: array |
| test_table_coverage() X-Ref |
| Test that all tables with user fields are covered by metadata providers |
| Generated: Wed Jan 22 11:59:49 2025 | Cross-referenced by PHPXref 0.7.1 |