- 🇬🇧United Kingdom jonathan1055
Adding parent issue because this commit added a DrupalPractice sniff to phpcs.xml.dist
Using @expectedException is not considered good testing practice because you cannot specify where exactly in the test method the exception should be triggered. Background info: https://thephp.cc/news/2016/02/questioning-phpunit-best-practices
We should use the method setExpectedException() instead right before the line that triggers the exception (usually right before the last line).
Therefore @martin107 and @vaplas worked on an automated conversion script: https://github.com/martinfrances107/convertExceptions
Review patch.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Adding parent issue because this commit added a DrupalPractice sniff to phpcs.xml.dist