-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What has happened to method setOutputCallback? #5319
Comments
|
Missing answer for second question inside Exptected behavior. I have came to same Problem. My fix is to use method expectOutputRegex and write test with text from echo. |
Thanks for the suggestion. I used |
Came here to ask the same.
If that was the case, then why was the method explicitly mentioned in the PHPUnit manual as a method in the public API ? The fact that it was marked as This really feels like it should have gotten a deprecation notice and deprecation period, as well as a changelog entry. |
Summary
Tests using
setOutputCallback
to suppress output succeed with PhpUnit 9.6.6 and below. The same test errors out with PhpUnit 10 (method does not exist). I do not see any mention of this in the change log, and have no idea how to get the equivalent functionality in the new version.Current behavior
Error (method setOutputCallback does not exist) for PhpUnit10.
How to reproduce
Any test that uses setOutputCallback.
Expected behavior
Method setOutputCallback should exist. Failing that, if the functionality has migrated to some different method, what is that method? Failing that as well, is there some other way to get the same functionality?
The text was updated successfully, but these errors were encountered: