MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 31 Aug 2020 22:44:13 +0000 (00:44 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 21 Oct 2020 10:46:00 +0000 (12:46 +0200)
commit40de097e6522091bd5918ae7ba4c84721d453b19
treef7e50a655ba6725557c9e8a6eb8b8c7c46faf58c
parenta293b3aea802500c2c9d0c6e7ffc4c9935c7fbec
MDL-67673 phpunit: Remove deprecated assertContains() uses on strings

Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
for operations on strings. Also the optional case parameter is. All uses
must be changed to one of:

- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertStringNotContainsString()
- assertStringNotContainsStringIgnoringCase()

More info: https://github.com/sebastianbergmann/phpunit/issues/3422

Regexp to find all uses:

ag 'assert(Not)?Contains\('
113 files changed:
admin/tool/behat/tests/manager_util_test.php
admin/tool/dataprivacy/tests/api_test.php
admin/tool/dataprivacy/tests/privacy_provider_test.php
admin/tool/httpsreplace/tests/httpsreplace_test.php
admin/tool/mobile/tests/api_test.php
admin/tool/mobile/tests/externallib_test.php
admin/tool/monitor/tests/eventobservers_test.php
admin/tool/templatelibrary/tests/externallib_test.php
admin/tool/uploadcourse/tests/course_test.php
admin/tool/usertours/tests/privacy_provider_test.php
analytics/tests/dataset_manager_test.php
auth/oauth2/tests/auth_test.php
availability/condition/completion/tests/condition_test.php
availability/condition/date/tests/condition_test.php
availability/condition/grade/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
blocks/rss_client/tests/cron_test.php
blog/tests/events_test.php
cache/tests/cache_test.php
calendar/tests/events_test.php
calendar/tests/externallib_test.php
cohort/tests/externallib_test.php
competency/tests/event_test.php
competency/tests/external_test.php
competency/tests/lib_test.php
contentbank/contenttype/h5p/tests/contenttype_h5p_test.php
contentbank/tests/contentbank_test.php
contentbank/tests/contenttype_test.php
course/tests/courselib_test.php
course/tests/externallib_test.php
enrol/lti/tests/helper_test.php
enrol/lti/tests/sync_members_test.php
enrol/lti/tests/tool_provider_test.php
enrol/manual/tests/lib_test.php
enrol/self/tests/self_test.php
filter/mediaplugin/tests/filter_test.php
grade/tests/importlib_test.php
grade/tests/report_graderlib_test.php
h5p/tests/h5p_file_storage_test.php
h5p/tests/helper_test.php
lib/dml/tests/pgsql_native_recordset_test.php
lib/filestorage/tests/zip_packer_test.php
lib/form/tests/course_test.php
lib/form/tests/duration_test.php
lib/form/tests/filetypes_util_test.php
lib/form/tests/privacy_provider_test.php
lib/phpunit/tests/advanced_test.php
lib/tests/antivirus_test.php
lib/tests/authlib_test.php
lib/tests/completionlib_test.php
lib/tests/core_media_player_native.php
lib/tests/core_renderer_template_exploit_test.php
lib/tests/event_course_module_viewed.php
lib/tests/externallib_test.php
lib/tests/filelib_test.php
lib/tests/filetypes_test.php
lib/tests/grouplib_test.php
lib/tests/medialib_test.php
lib/tests/messagelib_test.php
lib/tests/minify_test.php
lib/tests/modinfolib_test.php
lib/tests/moodlelib_test.php
lib/tests/outputcomponents_test.php
lib/tests/outputrequirementslib_test.php
lib/tests/progress_display_test.php
lib/tests/qrcode_test.php
lib/tests/requirejs_test.php
lib/tests/scheduled_task_test.php
lib/tests/session_redis_test.php
lib/tests/setuplib_test.php
lib/tests/tablelib_test.php
media/player/videojs/tests/player_test.php
media/player/youtube/tests/player_test.php
message/output/email/tests/send_email_task_test.php
message/tests/api_test.php
message/tests/externallib_test.php
mod/assign/feedback/comments/tests/privacy_test.php
mod/assign/feedback/editpdf/tests/editpdf_test.php
mod/assign/submission/comments/tests/privacy_test.php
mod/assign/tests/externallib_test.php
mod/assign/tests/locallib_test.php
mod/assign/tests/privacy_test.php
mod/data/tests/lib_test.php
mod/feedback/tests/events_test.php
mod/forum/tests/externallib_test.php
mod/forum/tests/mail_test.php
mod/forum/tests/maildigest_test.php
mod/glossary/tests/external_test.php
mod/quiz/accessrule/seb/tests/quiz_settings_test.php
mod/quiz/accessrule/seb/tests/rule_test.php
mod/quiz/report/overview/tests/report_test.php
mod/quiz/tests/quiz_question_bank_view_test.php
mod/wiki/tests/wikiparser_test.php
mod/workshop/allocation/manual/tests/privacy_provider_test.php
mod/workshop/tests/cron_task_test.php
notes/tests/generator_test.php
question/behaviour/deferredcbm/tests/behaviourtype_test.php
question/engine/tests/helpers.php
question/format/aiken/tests/aikenformat_test.php
question/format/multianswer/tests/multianswerformat_test.php
question/format/xml/tests/qformat_xml_import_export_test.php
question/tests/bank_view_test.php
question/tests/question_bank_column_test.php
question/type/essay/tests/walkthrough_test.php
search/engine/solr/tests/engine_test.php
search/tests/external_test.php
search/tests/manager_test.php
user/tests/externallib_test.php
user/tests/userroleseditable_test.php