The new work done in the master branch prevents unit tests from working in Moodle 3.9 and 3.10. Moodle 3.11 onwards is using PHPUnit 9, which has a different function for asserting regular expression matches.
Based on the existing branches in this repo, it looks like we should backport the duplicate detection and refactoring work to the MOODLE_39_STABLE branch, but not update the unit tests to use assertMatchesRegularExpression.
The new work done in the master branch prevents unit tests from working in Moodle 3.9 and 3.10. Moodle 3.11 onwards is using PHPUnit 9, which has a different function for asserting regular expression matches.
Based on the existing branches in this repo, it looks like we should backport the duplicate detection and refactoring work to the MOODLE_39_STABLE branch, but not update the unit tests to use
assertMatchesRegularExpression.