Skip to content

Conversation

jay-oswald
Copy link

Updating unit tests. assertContains does not work with the string, and is deprecated, replaced with assertStringContainsString and the not equivalents. Same with regex tests, also updated and replaced, as assertRegExp is deprecated and getting removed from phpunit 10

Tested with php 8.1 and moodle 4.1, however moodle 3.9 uses phpunit 7.5.

assertStringContainsString existed in 7.5, however assertMatchesRegularExpression had not been added yet.

Happy to re-do the PR without the regex if you want to merge into 3.9, or could create a new 4.1 branch?

@jay-oswald
Copy link
Author

I decided to just remove the assertRegExp fix, as this means it stays 3.9 compatible, changing regex can be done on a 4.1+ version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant