MDL-67673 phpunit: Fix the return type of template methods
commitd81a94807b44d094309b30ff1e068173dea65689
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Sun, 2 Aug 2020 08:59:12 +0000 (2 10:59 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 21 Oct 2020 10:46:04 +0000 (21 12:46 +0200)
treebbcd6023d8d873e716d1ddd93441aa2beb3abdec
parentc611109ed71f06e7630275753d059923c78d519d
MDL-67673 phpunit: Fix the return type of template methods

All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
421 files changed:
admin/tool/behat/tests/manager_util_test.php
admin/tool/capability/tests/events_test.php
admin/tool/cohortroles/tests/api_test.php
admin/tool/cohortroles/tests/privacy_test.php
admin/tool/dataprivacy/tests/expired_data_requests_test.php
admin/tool/dataprivacy/tests/task_test.php
admin/tool/langimport/tests/events_test.php
admin/tool/log/store/database/tests/privacy_test.php
admin/tool/log/store/legacy/tests/privacy_test.php
admin/tool/log/store/standard/tests/privacy_test.php
admin/tool/log/store/standard/tests/store_test.php
admin/tool/log/tests/privacy_test.php
admin/tool/lp/tests/externallib_test.php
admin/tool/lpmigrate/tests/processor_test.php
admin/tool/messageinbound/tests/manager_test.php
admin/tool/messageinbound/tests/privacy_test.php
admin/tool/mobile/tests/privacy_provider_test.php
admin/tool/monitor/tests/eventobservers_test.php
admin/tool/monitor/tests/events_test.php
admin/tool/monitor/tests/generator_test.php
admin/tool/monitor/tests/privacy_test.php
admin/tool/monitor/tests/rule_manager_test.php
admin/tool/monitor/tests/subscription_test.php
admin/tool/monitor/tests/task_check_subscriptions_test.php
admin/tool/monitor/tests/task_clean_events_test.php
admin/tool/policy/tests/externallib_test.php
admin/tool/policy/tests/privacy_provider_test.php
admin/tool/recyclebin/tests/category_bin_test.php
admin/tool/recyclebin/tests/course_bin_test.php
admin/tool/recyclebin/tests/events_test.php
admin/tool/usertours/tests/accessdate_filter_test.php
admin/tool/usertours/tests/manager_test.php
admin/tool/usertours/tests/role_filter_test.php
admin/tool/usertours/tests/step_test.php
admin/tool/usertours/tests/tour_test.php
analytics/tests/course_test.php
analytics/tests/dataset_manager_test.php
analytics/tests/model_test.php
analytics/tests/prediction_actions_test.php
analytics/tests/prediction_test.php
analytics/tests/privacy_test.php
analytics/tests/stats_test.php
auth/email/tests/external_test.php
auth/manual/tests/manual_test.php
auth/manual/tests/privacy_provider_test.php
auth/mnet/tests/privacy_provider_test.php
auth/oauth2/tests/privacy_provider_test.php
auth/tests/external_test.php
auth/tests/privacy_test.php
availability/condition/completion/tests/condition_test.php
availability/condition/date/tests/condition_test.php
availability/condition/group/tests/condition_test.php
availability/condition/grouping/tests/condition_test.php
availability/condition/profile/tests/condition_test.php
availability/tests/info_test.php
availability/tests/tree_test.php
backup/controller/tests/controller_test.php
backup/converter/moodle1/tests/moodle1_converter_test.php
backup/moodle2/tests/backup_encrypted_content_test.php
backup/moodle2/tests/backup_xml_transformer_test.php
backup/tests/automated_backup_test.php
backup/tests/course_copy_test.php
backup/tests/externallib_test.php
backup/util/checks/tests/checks_test.php
backup/util/dbops/tests/backup_dbops_test.php
backup/util/factories/tests/factories_test.php
backup/util/helper/tests/restore_structure_parser_processor_test.php
backup/util/plan/tests/plan_test.php
backup/util/plan/tests/step_test.php
backup/util/plan/tests/task_test.php
backup/util/structure/tests/structure_test.php
badges/tests/badgeslib_test.php
badges/tests/external_test.php
badges/tests/privacy_test.php
blocks/comments/tests/events_test.php
blocks/comments/tests/privacy_provider_test.php
blocks/online_users/tests/online_users_test.php
blocks/recentlyaccesseditems/tests/observer_test.php
blocks/rss_client/tests/privacy_test.php
blocks/tests/privacy_test.php
blog/tests/events_test.php
blog/tests/external_test.php
blog/tests/lib_test.php
blog/tests/privacy_test.php
cache/stores/apcu/tests/apcu_test.php
cache/stores/redis/tests/compressor_test.php
cache/stores/redis/tests/redis_test.php
cache/tests/administration_helper_test.php
cache/tests/cache_test.php
cache/tests/config_writer_test.php
cache/tests/fixtures/stores.php
calendar/tests/calendartype_test.php
calendar/tests/container_test.php
calendar/tests/events_related_objects_cache_test.php
calendar/tests/events_test.php
calendar/tests/externallib_test.php
calendar/tests/lib_test.php
calendar/tests/local_api_test.php
calendar/tests/privacy_test.php
calendar/tests/rrule_manager_test.php
calendar/tests/std_proxy_test.php
cohort/tests/privacy_test.php
comment/tests/externallib_test.php
comment/tests/privacy_test.php
competency/tests/external_test.php
competency/tests/privacy_test.php
completion/tests/api_test.php
completion/tests/progress_test.php
course/format/weeks/tests/observer_test.php
course/tests/category_hooks_test.php
course/tests/category_test.php
course/tests/customfield_test.php
course/tests/events_test.php
course/tests/externallib_test.php
course/tests/search_test.php
customfield/field/checkbox/tests/plugin_test.php
customfield/field/date/tests/plugin_test.php
customfield/field/select/tests/plugin_test.php
customfield/field/text/tests/plugin_test.php
customfield/field/textarea/tests/plugin_test.php
enrol/flatfile/tests/privacy_provider_test.php
enrol/imsenterprise/tests/imsenterprise_test.php
enrol/lti/tests/data_connector_test.php
enrol/lti/tests/helper_test.php
enrol/lti/tests/lib_test.php
enrol/lti/tests/privacy_provider_test.php
enrol/lti/tests/sync_members_test.php
enrol/lti/tests/tool_provider_test.php
enrol/paypal/tests/privacy_provider_test.php
enrol/tests/course_enrolment_manager_test.php
enrol/tests/role_external_test.php
favourites/tests/component_favourite_service_test.php
favourites/tests/privacy_test.php
favourites/tests/repository_test.php
favourites/tests/user_favourite_service_test.php
filter/algebra/tests/filter_test.php
filter/displayh5p/tests/filter_test.php
filter/multilang/tests/filter_test.php
filter/tex/tests/filter_test.php
grade/export/ods/tests/logging_test.php
grade/export/txt/tests/logging_test.php
grade/export/xls/tests/logging_test.php
grade/export/xml/tests/logging_test.php
grade/import/csv/tests/load_data_test.php
grade/report/grader/tests/privacy_test.php
grade/report/overview/tests/externallib_test.php
grade/report/user/tests/lib_test.php
grade/report/user/tests/privacy_test.php
grade/tests/events_test.php
grade/tests/grades_grader_gradingpanel_point_external_store_test.php
grade/tests/privacy_test.php
h5p/tests/editor_ajax_test.php
h5p/tests/editor_framework_test.php
h5p/tests/event_h5p_deleted_test.php
h5p/tests/event_h5p_viewed_test.php
h5p/tests/external_test.php
h5p/tests/framework_test.php
h5p/tests/generator_test.php
h5p/tests/h5p_core_test.php
h5p/tests/h5p_file_storage_test.php
iplookup/tests/geoip_test.php
iplookup/tests/geoplugin_test.php
lib/antivirus/clamav/tests/scanner_test.php
lib/ddl/tests/ddl_test.php
lib/dml/tests/dml_test.php
lib/dml/tests/pgsql_native_recordset_test.php
lib/dml/tests/recordset_walk_test.php
lib/dml/tests/sqlsrv_native_moodle_database_test.php
lib/filebrowser/tests/file_browser_test.php
lib/filestorage/tests/file_system_filedir_test.php
lib/filestorage/tests/file_system_test.php
lib/filestorage/tests/zip_packer_test.php
lib/form/tests/dateselector_test.php
lib/form/tests/datetimeselector_test.php
lib/grade/tests/fixtures/lib.php
lib/phpunit/classes/database_driver_testcase.php
lib/phpunit/classes/restore_date_testcase.php
lib/phpunit/tests/basic_test.php
lib/tests/ajaxlib_test.php
lib/tests/antivirus_test.php
lib/tests/blocklib_test.php
lib/tests/calendar_cron_task_test.php
lib/tests/collator_test.php
lib/tests/component_test.php
lib/tests/core_media_player_native.php
lib/tests/csvclass_test.php
lib/tests/customcontext_test.php
lib/tests/event/contentbank_content_created_test.php
lib/tests/event/contentbank_content_deleted_test.php
lib/tests/event/contentbank_content_updated_test.php
lib/tests/event/contentbank_content_uploaded_test.php
lib/tests/event/contentbank_content_viewed_test.php
lib/tests/event_profile_field_test.php
lib/tests/event_user_graded_test.php
lib/tests/events_test.php
lib/tests/exporter_test.php
lib/tests/externallib_test.php
lib/tests/gdlib_test.php
lib/tests/h5p_get_content_types_task_test.php
lib/tests/lock_test.php
lib/tests/medialib_test.php
lib/tests/moodle_page_test.php
lib/tests/myprofilelib_test.php
lib/tests/notification_test.php
lib/tests/persistent_test.php
lib/tests/plugin_manager_test.php
lib/tests/plugininfo/base_test.php
lib/tests/questionlib_test.php
lib/tests/rsslib_test.php
lib/tests/session_redis_test.php
lib/tests/statslib_test.php
lib/tests/task_database_logger_test.php
lib/tests/task_logging_test.php
lib/tests/time_splittings_test.php
lib/tests/user_test.php
lib/tests/useragent_test.php
lib/xapi/tests/external/post_statement_test.php
media/player/html5audio/tests/player_test.php
media/player/html5video/tests/player_test.php
media/player/swf/tests/player_test.php
media/player/videojs/tests/player_test.php
media/player/vimeo/tests/player_test.php
media/player/youtube/tests/player_test.php
message/output/airnotifier/tests/externallib_test.php
message/output/airnotifier/tests/privacy_test.php
message/output/email/tests/privacy_test.php
message/output/jabber/tests/privacy_test.php
message/output/popup/tests/api_test.php
message/output/popup/tests/externallib_test.php
message/tests/events_test.php
message/tests/externallib_test.php
message/tests/helper_test.php
message/tests/inbound_test.php
message/tests/messagelib_test.php
message/tests/migrate_message_data_task_test.php
message/tests/search_received_test.php
message/tests/search_sent_test.php
mnet/service/enrol/tests/privacy_test.php
mnet/tests/events_test.php
mod/assign/feedback/editpdf/tests/privacy_test.php
mod/assign/tests/base_test.php
mod/book/tests/events_test.php
mod/book/tests/lib_test.php
mod/book/tests/search_test.php
mod/book/tool/exportimscp/tests/events_test.php
mod/book/tool/importhtml/tests/locallib_test.php
mod/book/tool/print/tests/events_test.php
mod/chat/tests/lib_test.php
mod/chat/tests/privacy_test.php
mod/choice/tests/events_test.php
mod/choice/tests/privacy_provider_test.php
mod/data/tests/events_test.php
mod/data/tests/externallib_test.php
mod/data/tests/import_test.php
mod/data/tests/lib_test.php
mod/data/tests/privacy_provider_test.php
mod/data/tests/search_test.php
mod/feedback/tests/events_test.php
mod/feedback/tests/external_test.php
mod/feedback/tests/privacy_test.php
mod/folder/tests/events_test.php
mod/folder/tests/lib_test.php
mod/folder/tests/search_test.php
mod/forum/tests/builders_exported_posts_test.php
mod/forum/tests/events_test.php
mod/forum/tests/exporters_discussion_test.php
mod/forum/tests/externallib_test.php
mod/forum/tests/generator_test.php
mod/forum/tests/lib_test.php
mod/forum/tests/mail_group_test.php
mod/forum/tests/mail_test.php
mod/forum/tests/maildigest_test.php
mod/forum/tests/managers_capability_test.php
mod/forum/tests/privacy_provider_test.php
mod/forum/tests/private_replies_test.php
mod/forum/tests/qanda_test.php
mod/forum/tests/search_test.php
mod/forum/tests/subscriptions_test.php
mod/forum/tests/vaults_discussion_list_test.php
mod/forum/tests/vaults_discussion_test.php
mod/forum/tests/vaults_post_test.php
mod/glossary/tests/events_test.php
mod/glossary/tests/privacy_provider_test.php
mod/glossary/tests/search_test.php
mod/label/tests/lib_test.php
mod/lesson/tests/events_test.php
mod/lesson/tests/external_test.php
mod/lesson/tests/privacy_test.php
mod/lti/service/gradebookservices/tests/privacy_provider_test.php
mod/lti/service/gradebookservices/tests/task_cleanup_test.php
mod/lti/service/memberships/tests/privacy_provider_test.php
mod/lti/tests/externallib_test.php
mod/lti/tests/lib_test.php
mod/lti/tests/task_clean_access_tokens_test.php
mod/page/tests/lib_test.php
mod/quiz/accessrule/seb/tests/access_manager_test.php
mod/quiz/accessrule/seb/tests/backup_restore_test.php
mod/quiz/accessrule/seb/tests/event_test.php
mod/quiz/accessrule/seb/tests/link_generator_test.php
mod/quiz/accessrule/seb/tests/quiz_settings_test.php
mod/quiz/accessrule/seb/tests/rule_test.php
mod/quiz/accessrule/seb/tests/template_test.php
mod/quiz/tests/external_test.php
mod/quiz/tests/repaginate_test.php
mod/resource/tests/events_test.php
mod/resource/tests/lib_test.php
mod/resource/tests/search_test.php
mod/scorm/report/basic/tests/privacy_test.php
mod/scorm/report/interactions/tests/privacy_test.php
mod/scorm/report/objectives/tests/privacy_test.php
mod/scorm/tests/events_test.php
mod/scorm/tests/externallib_test.php
mod/scorm/tests/lib_test.php
mod/scorm/tests/locallib_test.php
mod/survey/tests/events_test.php
mod/survey/tests/externallib_test.php
mod/survey/tests/lib_test.php
mod/survey/tests/privacy_test.php
mod/url/tests/lib_test.php
mod/wiki/tests/events_test.php
mod/wiki/tests/externallib_test.php
mod/wiki/tests/privacy_test.php
mod/wiki/tests/search_test.php
mod/workshop/allocation/random/tests/allocator_test.php
mod/workshop/eval/best/tests/lib_test.php
mod/workshop/form/accumulative/tests/lib_test.php
mod/workshop/form/numerrors/tests/lib_test.php
mod/workshop/form/rubric/tests/lib_test.php
mod/workshop/tests/events_test.php
mod/workshop/tests/external_test.php
mod/workshop/tests/locallib_test.php
mod/workshop/tests/portfolio_caller_test.php
mod/workshop/tests/privacy_provider_test.php
my/tests/events_test.php
notes/tests/events_test.php
notes/tests/lib_test.php
privacy/classes/tests/provider_testcase.php
privacy/tests/manager_test.php
privacy/tests/writer_test.php
question/behaviour/adaptive/tests/behaviourtype_test.php
question/behaviour/adaptive/tests/mark_display_test.php
question/behaviour/deferredcbm/tests/behaviourtype_test.php
question/behaviour/deferredfeedback/tests/behaviourtype_test.php
question/behaviour/immediatecbm/tests/behaviourtype_test.php
question/behaviour/immediatefeedback/tests/behaviourtype_test.php
question/behaviour/informationitem/tests/behaviourtype_test.php
question/behaviour/interactive/tests/behaviourtype_test.php
question/behaviour/interactivecountback/tests/behaviourtype_test.php
question/behaviour/manualgraded/tests/behaviourtype_test.php
question/behaviour/missing/tests/behaviourtype_test.php
question/engine/tests/helpers.php
question/engine/tests/questionattempt_test.php
question/engine/tests/questionattempt_with_steps_test.php
question/engine/tests/questionattemptiterator_test.php
question/engine/tests/questionattemptstepiterator_test.php
question/engine/tests/questionusage_autosave_test.php
question/engine/tests/unitofwork_test.php
question/engine/upgrade/tests/helper.php
question/tests/category_class_test.php
question/tests/events_test.php
question/tests/externallib_test.php
question/type/calculated/tests/questiontype_test.php
question/type/calculatedsimple/tests/questiontype_test.php
question/type/ddimageortext/tests/questiontype_test.php
question/type/ddmarker/tests/questiontype_test.php
question/type/ddwtos/tests/questiontype_test.php
question/type/description/tests/questiontype_test.php
question/type/essay/tests/questiontype_test.php
question/type/gapselect/tests/questiontype_test.php
question/type/match/tests/questiontype_test.php
question/type/multianswer/tests/questiontype_test.php
question/type/multichoice/tests/questiontype_test.php
question/type/numerical/tests/questiontype_test.php
question/type/random/tests/questiontype_test.php
question/type/shortanswer/tests/questiontype_test.php
question/type/tests/question_first_matching_answer_grading_strategy_test.php
question/type/truefalse/tests/questiontype_test.php
rating/tests/externallib_test.php
rating/tests/rating_test.php
report/completion/tests/events_test.php
report/log/tests/events_test.php
report/log/tests/lib_test.php
report/loglive/tests/events_test.php
report/outline/tests/lib_test.php
report/questioninstances/tests/events_test.php
report/stats/tests/events_test.php
report/stats/tests/lib_test.php
report/usersessions/tests/lib_test.php
repository/flickr/tests/privacy_test.php
repository/nextcloud/tests/access_controlled_link_manager_test.php
repository/nextcloud/tests/lib_test.php
repository/nextcloud/tests/ocs_test.php
repository/onedrive/tests/privacy_test.php
repository/recent/tests/lib_test.php
repository/tests/privacy_test.php
rss/tests/privacy_test.php
search/engine/simpledb/tests/engine_test.php
search/engine/simpledb/tests/privacy_test.php
search/engine/solr/tests/engine_test.php
search/tests/base_activity_test.php
search/tests/base_test.php
search/tests/document_test.php
search/tests/engine_test.php
search/tests/external_test.php
search/tests/generator/lib.php
search/tests/manager_test.php
tag/tests/events_test.php
tag/tests/taglib_test.php
user/profile/field/checkbox/tests/privacy_test.php
user/profile/field/datetime/tests/privacy_test.php
user/profile/field/menu/tests/privacy_test.php
user/profile/field/text/tests/privacy_test.php
user/profile/field/textarea/tests/privacy_test.php
user/tests/search_test.php
webservice/tests/events_test.php
webservice/tests/externallib_test.php
webservice/tests/lib_test.php
webservice/tests/privacy_test.php
webservice/xmlrpc/tests/lib_test.php
webservice/xmlrpc/tests/locallib_test.php
webservice/xmlrpc/tests/xmlrpc_server_test.php