-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
I just read the article https://thephp.cc/news/2016/02/questioning-phpunit-best-practices, and cannot really comprehend the conclusion.
I applaud the move to a better structure to test exceptions. And I have always used the setExpectedException() instead of the annotation, because of some of the reasons you have mentioned.
However, in the article, the conclusion is that setExpectedException() will be deprecated for PHPUnit 6, and the annotation will stay.
This means that I cannot use the new functions because of the PHP version requirements, and can't continue to use setExpectedException() because it will become deprecated... so you basically force me to instead use the annotation now for the foreseeable future.
I think that there's no harm in keeping the setExpectedException() method for now, and it can be rewritten as a simple stub that uses the new methods for better maintainability. So please don't deprecate it (just yet).