mudrd8mz / moodle-tool_pluginskel

Generator of Moodle plugins skeletons
https://moodle.org/plugins/tool_pluginskel
Other
51 stars 46 forks source link

Prepare for PHPUnit 9 #105

Closed ewallah closed 3 years ago

ewallah commented 3 years ago

assertContains() and assertNotContains() with string haystacks are deprecated and will not be supported in PHPUnit 9.

Moodle 3.10+ generates more than 60 refactor warnings to use assertStringContainsString()or assertStringContainsStringIgnoringCase().

This can be fixed from the command line for Moodle3.8+ versions:

cd admin/tool/pluginskel
find .  -name \*.php -exec sed -i "s/assertContains/assertStringContainsString/g" {} \;
find .  -name \*.php -exec sed -i "s/assertNotContains/assertStringNotContainsString/g" {} \;
mudrd8mz commented 3 years ago

Fixed in the said commit, to be released in the next version. Thanks.